Disable or Enable All GameObjects in an Array in Unity - Easy Solution
The C# script :
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class DisableObject : MonoBehaviour
{
public GameObject[] myObject;
public void MyFunction()
{
for (int i = 0; i < myObject.Length; i++)
{
myObject[i].SetActive(false);
}
}
}
unity disable all objects in array désactiver un gameobject unity setactive unity unity lateupdate unity set active array get disable gameobject unity disable a script unity gameobject is active unity disable all objects in array désactiver un gameobject unity setactive unity unity lateupdate unity set active array get disable gameobject unity
Post a Comment
image video quote pre code