Version: Unity 7.0 Alpha (7000.0)
LanguageEnglish
  • C#

World.GetOrCreateSystemsAndLogException

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Declaration

public NativeList<SystemHandle> GetOrCreateSystemsAndLogException(NativeList<SystemTypeIndex> types, AllocatorHandle allocator);

Parameters

Parameter Description
types The system types to create, in the order in which they should be created.
allocator The allocator to use to allocate the output system list

Returns

NativeList<SystemHandle> A list of system instances

Description

Creates systems from the list of types which aren't already created in the current world.

This function creates systems in the order they are passed in, and ignores CreateBeforeAttribute and CreateAfterAttribute validity. If errors are encountered either when creating the system or when calling OnCreate, a default SystemHandle will be returned for that system.

Important: This function creates a sync point if any systems are created, which means that the EntityManager waits for all currently running Jobs to complete before creating the systems, and no additional Jobs can start before the function is finished. A sync point can cause a drop in performance because the ECS framework may not be able to make use of the processing power of all available cores.