#Manually loading systems.

1 messages · Page 1 of 1 (latest)

midnight cosmos
#

Is there a way to manually load systems rather than having them all automatically load on startup?

tight mango
#

ICustomBootstrap is the main way, but it's not that friendly. we're working on adding docs and making it friendlier. look in the netcode package for example usage

midnight cosmos
#

I'm looking to just create specific systems that were disabled by [DisableAutoCreation]. Which seems to work by using World.DefaultGameObjectInjectionWorld.GetOrCreateSystemManaged(systemGroupType);

#

The one blocker I'm running into now is trying to create ComponentSystemGroups that were disabled by [DisableAutoCreation].

var parent = (ComponentSystemGroup)World.DefaultGameObjectInjectionWorld.GetExistingSystemManaged(parentGroupType);
var system = World.DefaultGameObjectInjectionWorld.GetOrCreateSystemManaged(systemGroupType);
parent.AddSystemToUpdateList(system);

Doesn't cause the created system group to show up in the systems window.

#

Solved. For future reference, my issue was putting the monobehavior which ran those snippets in a subscene, rather than in the main unity scene.