Dynamic Plugins and Stage Registration #5397
kosukeminoru
started this conversation in
General
Replies: 2 comments
-
Can you please modify the title to "Dynamic plugins and stage registration" so it's easy for others to understand the problem at a glance? |
Beta Was this translation helpful? Give feedback.
0 replies
-
I pushed a new version to https://github.com/kosukeminoru/BevyDynamicBug. It now works as expected and running app.add_default_stages(); in the dynamic lib results in a panic. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
0.7.0
As a quick background, I'm trying to use dynamic plugins to allow players to create their own functionality and ship it. I'm using the dynamic plugin as an external dylib, however the dynamic plugin doesn't seem to recognize the stages in the app.
If I run this:
for stage in app.schedule.iter_stages() {
println!("{:?}", stage.0);
}
in the dynamic app, it will print out the normal stages, however if I try to add a system, the code panics and says it can't find 'Update'.
It only works if you duplicate the default stages by adding:
app.add_default_stages();
Printing the stages now will print the default stages twice.
I created a repository to replicate the bug. First, you have to compile the lib by running cargo build in the lib folder. Then cargo run on the main directory. You will see it doesn't work unless you rebuild the lib by uncommenting the //app.add_default_stages(); line.
https://github.com/kosukeminoru/BevyDynamicBug
p.s. I couldn't get the Macro Dynamic Plugin to work without the entire bevy crate, so apologies for the long compile time.
Beta Was this translation helpful? Give feedback.
All reactions