SKTexture: Error loading image resource

后端 未结 2 1254
一整个雨季
一整个雨季 2021-01-22 05:02

This seems to work perfectly fine:

\"enter

and when I created a new project with e

相关标签:
2条回答
  • 2021-01-22 05:17

    A similar error occurred to me while following a tutorial to develop a game using spritekit.

    Error was "SKTexture: Error loading image resource:"imagename""

    In my case the path was not set properly.

    We can recheck to be sure that the path is always set correctly.

    0 讨论(0)
  • 2021-01-22 05:29

    Where / How did you add the image in your project ?

    The second syntax (without the path) should be ok. You don't even have to specify .png if that's the file format (but you need to if it something else : .jpg, .jpeg, ...

    You might want to check that your asset is "checked" for the target membership. On the right side (Utilities) > File Inspector > Target Membership : check your target (not the tests one if you don't have any tests).

    0 讨论(0)
提交回复
热议问题