Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

unity c# set list to set active true

// Set all objects in list to true:
public class Program : MonoBehaviour
{
    public GameObject[] list;
    
    void Start()
    {
        foreach (var obj in list)
        {
            obj.SetActive(true);
        }
    }
}
Source by forum.unity.com #
 
PREVIOUS NEXT
Tagged: #unity #set #list #set #active #true
ADD COMMENT
Topic
Name
2+2 =