Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Texture does not load #88

Closed
woaiios opened this issue Nov 17, 2017 · 4 comments
Closed

Texture does not load #88

woaiios opened this issue Nov 17, 2017 · 4 comments
Labels

Comments

@woaiios
Copy link

woaiios commented Nov 17, 2017

Place image in the workspace.
image

Block

let ground = Block(size: size, spriteSheetName: "Ground")
ground.position = center
add(ground)

Player

let player = Actor()
player.position = center
add(player)
player.textureNamePrefix = "Player/"
        
let idleAnimation = Animation(name: "Idle", frameCount: 1, frameDuration: 1)

The ground is visible, but the player is hidden.

@JohnSundell
Copy link
Owner

Hi @woaiios 👋 The problem is that Xcode groups are not translated into real folders in your app's bundle, so the player's idle texture will actually be at the path /0@2x.png. To fix this you can use folder references instead of groups, that way a folder will also be created in your app bundle 👍

@JohnSundell
Copy link
Owner

@woaiios Did the above solution work for you, or can I help you in any other way? 🙂 Let me know if this can be closed.

@woaiios
Copy link
Author

woaiios commented Nov 20, 2017

Thank you.
Test passed.
image

@JohnSundell
Copy link
Owner

Awesome 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants