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

Problems working with the create in Bevy 0.10.1 #3

Open
skeetcha opened this issue Jun 20, 2023 · 2 comments
Open

Problems working with the create in Bevy 0.10.1 #3

skeetcha opened this issue Jun 20, 2023 · 2 comments

Comments

@skeetcha
Copy link

Hello! I'm currently trying to create a game with spritesheets using this crate, but I'm working with Bevy 0.10.1 whereas this crate was made with Bevy 0.9. I tried just adding it to my Cargo.toml, but it then said that TextureAtlasLoaderPlugin didn't implement Plugin, so I then decided to fork the repo and update it to Bevy 0.10.1 myself. However, that got met with its own problems, specifically on line 68. texture_handles is private outside of bevy's own crate. So it's possible to add all of the different sprites into the texture atlas, however the check for duplicate named sprites isn't possible in Bevy 0.10.1 (however my use case doesn't require these).
Having looked at the documentation of Bevy and how this crate's code is set up, I'm not sure how one could make this crate in Bevy 0.10, but that cursory look of the docs was only cursory and quite short so there might be some way to update this crate somehow.

@ickshonpe
Copy link
Owner

ickshonpe commented Jun 20, 2023

Hello! I'm currently trying to create a game with spritesheets using this crate, but I'm working with Bevy 0.10.1 whereas this crate was made with Bevy 0.9. I tried just adding it to my Cargo.toml, but it then said that TextureAtlasLoaderPlugin didn't implement Plugin, so I then decided to fork the repo and update it to Bevy 0.10.1 myself. However, that got met with its own problems, specifically on line 68. texture_handles is private outside of bevy's own crate. So it's possible to add all of the different sprites into the texture atlas, however the check for duplicate named sprites isn't possible in Bevy 0.10.1 (however my use case doesn't require these).
Having looked at the documentation of Bevy and how this crate's code is set up, I'm not sure how one could make this crate in Bevy 0.10, but that cursory look of the docs was only cursory and quite short so there might be some way to update this crate somehow.

Hi, yep it was by mistake in bevy 0.10 that texture_handles was made private, which is why I haven't updated this crate. I think it is possible to hack around it but Bevy 0.11 is close to release where texture_handles is public again so it's probably not worth the effort at this point.

@ickshonpe
Copy link
Owner

It looks like it might work for your use case if you just delete the section that you highlighted from line 67 to 77 though.

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

No branches or pull requests

2 participants