Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

unity deactivate scripts in list

 public List<MonoBehaviour> Scripts = new List<MonoBehaviour>();

    void Update()
    {
        foreach (var sc in Scripts)
        {
          //Active Scripts in List
          sc.enabled = true;
          //Deactive Scripts in List
          sc.enabled = false;
        }            
    }
 
PREVIOUS NEXT
Tagged: #unity #deactivate #scripts #list
ADD COMMENT
Topic
Name
5+2 =