Runners explicitly call App.initialize()#690
Merged
cart merged 1 commit intobevyengine:masterfrom Oct 18, 2020
smokku:master
Merged
Runners explicitly call App.initialize()#690cart merged 1 commit intobevyengine:masterfrom smokku:master
cart merged 1 commit intobevyengine:masterfrom
smokku:master
Conversation
cart
reviewed
Oct 16, 2020
| &mut create_window_event_reader, | ||
| ); | ||
|
|
||
| app.initialize(); |
Member
There was a problem hiding this comment.
Is there a reason this is down here instead of at the top? This would be a slight change in init behavior, this now does window creation / event loop creation before running the startup systems.
Member
Author
There was a problem hiding this comment.
I wanted to do it right before entering the main loop.
- preparation
- initialize()
- loop {}
Member
Author
There was a problem hiding this comment.
The point of this change is to have access to resources created by runner in startup systems.
It is not needed in case of bevy_winit but we should keep things consistent across different plugins.
cart
reviewed
Oct 16, 2020
joshuajbouw
pushed a commit
to joshuajbouw/bevy
that referenced
this pull request
Oct 24, 2020
Merged
This file contains hidden or 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
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.
This change moves
startup_scheduleto a separateapp.initialize()function that needs to be called by the runner function.This allows the runner function to modify/prepare app environment for startup systems requirements. For example runner can insert its own resource for startup systems to use.