Version: 2023.2

GameObject.SetGameObjectsActive

切换到手册
public static void SetGameObjectsActive (NativeArray<int> instanceIDs, bool active);
public static void SetGameObjectsActive (ReadOnlySpan<int> instanceIDs, bool active);

参数

instanceIDs Instance IDs of GameObjects to activate or deactive.
active Activate or deactivate the objects, where true activates the GameObjects and false deactivates the GameObjects.

描述

Activates/Deactivates the GameObjects by instance ID, depending on the given true or false value.