Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1939: Add new derive to SpriteRenderPrefab r=Frizi a=valkum ## Description Add new derive to `SpriteRenderPrefab`. Utilizing #[new(default)] for the private field `handle` Reason: Creating a `SpriteSheetPrefab` from another create is currently not possible because of the private `handle` field. This approach was greenlit in amethyst#1585 ## Additions - SpriteRenderPrefab::new(Option<SpriteSheetReference>, usize) for creating a SpriteRenderPrefab with default `handle` field ## Modifications - SpriteRenderPrefab ## PR Checklist By placing an x in the boxes I certify that I have: - [ ] Updated the content of the book if this PR would make the book outdated. - [ ] Added a changelog entry if this will impact users, or modified more than 5 lines of Rust that wasn't a doc comment. - [x] Added unit tests for new code added in this PR. - [x] Acknowledged that by making this pull request I release this code under an MIT/Apache 2.0 dual licensing scheme. If this modified or created any rs files: - [x] Ran `cargo +stable fmt --all` - [x] Ran `cargo clippy --all --features "empty"` - [x] Ran `cargo test --all --features "empty"` Co-authored-by: Valkum <[email protected]>
- Loading branch information