Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

how to turn components on and off in unity through code

//enable
GetComponent<Collider>().enabled = true;

//disabled
GetComponent<Collider>().disabled = false;
 
PREVIOUS NEXT
Tagged: #turn #components #unity #code
ADD COMMENT
Topic
Name
2+5 =