Horje
unity destroy object invisible Code Example
how to make an object invisible unity
GetComponent(MeshRenderer).enabled = false;
unity destroy object invisible
 //INSIDE ON YOUR OBJECT'S SCRIPT
 
 void OnBecameInvisible() {

        Destroy (this.gameObject);
    
    }




Csharp

Related
transform face player unity Code Example transform face player unity Code Example
c# int to bool Code Example c# int to bool Code Example
can't click buttons unity Code Example can't click buttons unity Code Example
unity change sprite source image Code Example unity change sprite source image Code Example
unity camera follow player 3d smooth Code Example unity camera follow player 3d smooth Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
11