文档

Unity Engine

Download Unity

Unity Engine

CreateSystem<T>(World)

Create and return a handle for an instance of a system of type T in this World.
阅读时间1 分钟最后更新于 19 天前

Definition

  • Type: Method
  • Namespace: Unity.Entities
  • Assembly: UnityEngine.EntitiesModule
public static SystemHandle CreateSystem<T>(this World self) where T : unmanaged, ISystem

Parameters

self

The World

Returns

Type

Description

SystemHandleThe new system instance's handle of system type
T
in this World.

Remarks

This can result in multiple instances of the same system in a single World, which is generally undesirable.
Important: This function creates a sync point, which means that the EntityManager waits for all currently running Jobs to complete before creating the system, 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.