<tfoot id='MDqgc'></tfoot>
      <bdo id='MDqgc'></bdo><ul id='MDqgc'></ul>

      <small id='MDqgc'></small><noframes id='MDqgc'>

      <i id='MDqgc'><tr id='MDqgc'><dt id='MDqgc'><q id='MDqgc'><span id='MDqgc'><b id='MDqgc'><form id='MDqgc'><ins id='MDqgc'></ins><ul id='MDqgc'></ul><sub id='MDqgc'></sub></form><legend id='MDqgc'></legend><bdo id='MDqgc'><pre id='MDqgc'><center id='MDqgc'></center></pre></bdo></b><th id='MDqgc'></th></span></q></dt></tr></i><div id='MDqgc'><tfoot id='MDqgc'></tfoot><dl id='MDqgc'><fieldset id='MDqgc'></fieldset></dl></div>
      <legend id='MDqgc'><style id='MDqgc'><dir id='MDqgc'><q id='MDqgc'></q></dir></style></legend>

      1. 未找到 SpriteBuilder 图像文件

        时间:2024-08-12
        <legend id='whkuR'><style id='whkuR'><dir id='whkuR'><q id='whkuR'></q></dir></style></legend>

        <tfoot id='whkuR'></tfoot>

        <small id='whkuR'></small><noframes id='whkuR'>

      2. <i id='whkuR'><tr id='whkuR'><dt id='whkuR'><q id='whkuR'><span id='whkuR'><b id='whkuR'><form id='whkuR'><ins id='whkuR'></ins><ul id='whkuR'></ul><sub id='whkuR'></sub></form><legend id='whkuR'></legend><bdo id='whkuR'><pre id='whkuR'><center id='whkuR'></center></pre></bdo></b><th id='whkuR'></th></span></q></dt></tr></i><div id='whkuR'><tfoot id='whkuR'></tfoot><dl id='whkuR'><fieldset id='whkuR'></fieldset></dl></div>
              <tbody id='whkuR'></tbody>
                  <bdo id='whkuR'></bdo><ul id='whkuR'></ul>
                  本文介绍了未找到 SpriteBuilder 图像文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我在 sprit builder 资源文件夹中添加了一个 .png 图像并已发布.

                  I have added a .png image in sprit builder resource folder and I have published it.

                  我在 Published-IOS 下的 Resources 中的 sprite builder 所有文件夹中看到添加的图像.

                  I see the added image in sprite builder all folder in Resources under Published-IOS.

                  这里我尝试通过以下方式访问添加的图像.

                  Here I have tried to access the added image in following ways.

                  1. _hero.spriteFrame = [CCSpriteFrame frameWithImageNamed:@"Down.png"];

                  [_hero setTexture:[CCTexture textureWithFile:@"Game/Down.png"]]

                  但是这些方法都不起作用.

                  But none of these methods are working.

                  它在日志中显示错误.

                   -[CCFileUtils fullPathForFilename:contentScale:] : cocos2d: Warning: File not found: Down.png
                  

                  请帮我解决这个问题.我是使用此 sprit builder 的新手.

                  Please help me with this to resolve.Am a newbie using this sprit builder.

                  推荐答案

                  @"Down.png" 改成 @"Resources/Down.png" 因为你有包括在 SpriteBuilder 中创建的文件夹,用于对 SpriteBuilder 管理的资源文件的任何引用.

                  Change @"Down.png" to @"Resources/Down.png" because you have to include the folders created in SpriteBuilder for any references to resource files managed by SpriteBuilder.

                  同样,如果您在名为Levels"的子文件夹中有 some.ccb,则必须使用字符串 @"Levels/some.ccb" 加载它.

                  Likewise if you had some.ccb in a subfolder named "Levels" you'd have to load it with the string @"Levels/some.ccb".

                  这篇关于未找到 SpriteBuilder 图像文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:显示 CGRect 边框的简单方法? 下一篇:如何在 cocos2d ios 中播放 BGM 并知道当前播放时间?

                  相关文章

                  1. <legend id='PLXc5'><style id='PLXc5'><dir id='PLXc5'><q id='PLXc5'></q></dir></style></legend>
                    • <bdo id='PLXc5'></bdo><ul id='PLXc5'></ul>

                      <tfoot id='PLXc5'></tfoot>

                      <small id='PLXc5'></small><noframes id='PLXc5'>

                      <i id='PLXc5'><tr id='PLXc5'><dt id='PLXc5'><q id='PLXc5'><span id='PLXc5'><b id='PLXc5'><form id='PLXc5'><ins id='PLXc5'></ins><ul id='PLXc5'></ul><sub id='PLXc5'></sub></form><legend id='PLXc5'></legend><bdo id='PLXc5'><pre id='PLXc5'><center id='PLXc5'></center></pre></bdo></b><th id='PLXc5'></th></span></q></dt></tr></i><div id='PLXc5'><tfoot id='PLXc5'></tfoot><dl id='PLXc5'><fieldset id='PLXc5'></fieldset></dl></div>