#[BUG] Bug in SortSystemUpdateList(), nAfter <= 0

1 messages · Page 1 of 1 (latest)

orchid trout
#

Trying to create unmanaged system inside of normal system's OnCreate.
Simply calling state.World.CreateSystem<T>() where T is same type as normal system calling it.

orchid trout
#

Turns out error is due to update constraint attributes on T system

orchid trout
#

This probably needs a better message. Spent way too much time than I should

deft rivet
#

by normal system you mean system base?

#

what were the update constraints?

#

but this is a "can't happen" message, so definitely we should fix it so it doesn't happen

#

i guess i could modify it to say "this should never happen, please file a bug"

orchid trout
orchid trout
#

basically, just creating a system via World.CreateSystem will cause this error

#

even if it has DisableAutoCreation

#

as long as it has update constraints

deft rivet
#

and no creation constraints?

orchid trout
#

didn't check, only had those two

#

once removed - no error anymore

deft rivet
#

i see

#

ok just to make sure i understand: you have a system MySystem which calls state.World.CreateSystem<MySystem>() inside its OWN OnCreate method, trying to create another copy of itself?

#

and you have created the first instance of MySystem manually, via CreateSystem called from somewhere else?

orchid trout
#

I tried to create it from OnCreate the very first time and it didn't work either

deft rivet
#

i would point out that creating systems from oncreate is basically always a bad idea, because the order can't respect any createafter or createbefore constraints