running script on system #1885
-
|
The scripting is very powerful indeed! world.system().each([script](flecs::iter &it, size_t){
it.world().script_run("my_script", script);
});
it is solved by registering the script entity at the world, but i am afraid that it will break because it modifies the world in a stage auto sys_script = world.script("my_script").code(script);
world.system().each([sys_script](flecs::iter &it, size_t){
sys_script.run();
}); |
Beta Was this translation helpful? Give feedback.
Answered by
SanderMertens
Dec 3, 2025
Replies: 1 comment
-
|
Try marking the system with |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
yohanip
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Try marking the system with
.immediate(). That should fix it.