Documentation

Unity Engine

Download Unity

Unity Engine

AppendSystemToPlayerLoop(ComponentSystemBase, ref PlayerLoopSystem, Type)

Add an ECS system to a specific point in the Unity player loop, so that it is updated every frame.
Read time 1 minuteLast updated 8 hours ago

Definition

  • Type: Method
  • Namespace: Unity.Entities
  • Assembly: UnityEngine.CoreModule

AppendSystemToPlayerLoop(ComponentSystemBase, PlayerLoopSystem, Type)

public static void AppendSystemToPlayerLoop(ComponentSystemBase system, ref PlayerLoopSystem playerLoop, Type playerLoopSystemType)

Parameters

The ECS system to add to the player loop.

Existing player loop to modify (e.g. PlayerLoop.GetCurrentPlayerLoop())

playerLoopSystemType

The Type of the PlayerLoopSystem subsystem to which the ECS system should be appended. See the UnityEngine.PlayerLoop namespace for valid values.

Remarks

This function does not change the currently active player loop. If this behavior is desired, it's necessary to call PlayerLoop.SetPlayerLoop(playerLoop) after the systems have been removed.