Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

how to make an object appear and disappear in unity

void Update() {
   if (Input.GetMouseButtonDown(0)) {
     gameObject.active = true;
   }
   if (Input.GetMouseButtonDown(1)) {
     gameObject.active = false;
   }
 }
 
PREVIOUS NEXT
Tagged: #object #disappear #unity
ADD COMMENT
Topic
Name
2+2 =