forked from afonsolage/bevy_ecss
-
Notifications
You must be signed in to change notification settings - Fork 1
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
Bevy 0.14 #4
Open
AmonDeShir
wants to merge
14
commits into
TheBeardedQuack:main
Choose a base branch
from
AmonDeShir:0.14
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Bevy 0.14 #4
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Fixed an error where the application failed to load a CSS asset, resulting in the error: `tomt_bevycss::system: Failed to load stylesheet from handle StrongHandle<StyleSheetAsset>{ id: Index(AssetIndex { generation: 0, index: 0 }), path: Some(sheets/index.css) }`. The issue was related to the loading order of systems. Moving the entire schedule right after the update phase resolved the problem. - Make hot reload enabled when Bevy has the file_watcher feature enabled. - Updated the alpha demo: due to commit bevyengine/bevy#14017, an image can now have a BackgroundColor. The fix ensures alpha is adjusted based on the component combination: if an entity has a UIImage component, the alpha is set on it; if not, the BackgroundColor component is updated.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I bumped Bevy to 0.14.
Since 0.14 Bevy no longer re-exports
thiserror
, I added it to the crate dependencies. Additionally, Bevy has changed how theBackgroundColor
component works.BackgroundColor
no longer tints the color of images inImageBundle
. I updated the alpha demo so that alpha is adjusted based on the component combination: if an entity has aUIImage
component, the color is set on it; if not, theBackgroundColor
component is updated.I added support for
border-color
andborder-radius
properties, and renamedborder
toborder-width
to keep things consistent.I also simplified the usage of hot reload. It is now enabled automatically when Bevy's
file_watcher
feature is enabled. As a result, I removed thehot_reload
example since it is no longer needed.There was a bug (I think only in 0.14) where the game occasionally failed to load a CSS asset at startup, resulting in the following error:
This issue was related to the loading order of systems. Moving the entire schedule right after the update phase resolved the problem. I adapted this fix from the zmbush fork, and I think it would be nice to credit her in the README.
With these changes and minor fixes in the crate code, all examples now run successfully.