Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Size for
SpriteComponent.fromImage
should be nullable (#3054)
I received an assertion error after I set `autoResize` to true when I am using `SpriteComponent.fromImage` component. It's kinda weird for me that the message tells me **"If size is set, autoResize should be false or size should be null when autoResize is true.''**, but the thing is I never set the size for that image yet. Then, I check the code and I found out that the size will never be null anyway, so the `autoresize` should always be false. In this PR, I just remove all the fallback value for `size`, so it would not give an assertion error when `size` is not being set yet while the `autoresize` is true. --------- Co-authored-by: Lukas Klingsbo <me@lukas.fyi>
- Loading branch information