#how to config a update filter in unity ecs
1 messages · Page 1 of 1 (latest)
Set the system you want to update in to [DisableAutoCreation]. Then when creating your custom world, use world.CreateSystem<>() which will properly place the system in the group you specified (in addition to [DisableAutoCreation] attribute).
You could implement your attribute and pass enum or string and then while creating world collect all system types and filter them by concrete world
rather than CreateSystem, when creating a custom world with ICustomBootstrap i think it's a bit better to use DefaultWorldInitialization.GetAllSystemTypeIndices to get your list of systems, add your system type indices to the list, and then use TypeManager.SortSystemsInCreationOrder to sort them by CreateAfter/CreateBefore attribute, and then DefaultWorldInitialization.AddSystemsToRootLevelSystemGroups