You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My game creates and destroys multiple world (running lots of mini-games in sequence). I've found that for the first World everything works fine, but for subsequent games any static queries will never be called.
Stepping through the generated source it seems as though the query is simply not finding any relevant entities.
Just to be clear, this is with queries generated like this:
[Query][None<PendingDestroy>]privatestaticvoidMySpecialQuery(inThingwhatever){// Do stuff}
Note that it is a static query. Changing this to an instance method seems to fix the problem.
The text was updated successfully, but these errors were encountered:
If multiple worlds and multiple threads are in use then threads running the static query for one world might interfere with threads running the static query for another world by overwriting the cache and invalidating it while it's in use.
This could potentially be fixed by making the _{{queryMethod.MethodName}}_Initialized; and _{{queryMethod.MethodName}}_Query; methods [ThreadStatic]. But I haven't tested that.
My game creates and destroys multiple world (running lots of mini-games in sequence). I've found that for the first World everything works fine, but for subsequent games any static queries will never be called.
Stepping through the generated source it seems as though the query is simply not finding any relevant entities.
Just to be clear, this is with queries generated like this:
Note that it is a static query. Changing this to an instance method seems to fix the problem.
The text was updated successfully, but these errors were encountered: