Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

Destroy Game Object

//Box collider is triggered
// Use "Destroy ( other.gameObject );" to destroy other game object
private void OnTriggerEnter ( Collider other )
    {
   //    if(other.tag == "Plane" ){
        Destroy ( this.gameObject );
   // }
    }
//Box collider is not triggered
//  private void OnCollisionEnter ( Collision collision )
//    {
//        Destroy ( gameObject );
//    }
Comment

PREVIOUS NEXT
Code Example
Csharp :: difference between iqueryable and ienumerable c# 
Csharp :: mute sound unity 
Csharp :: how to say hello world in c# 
Csharp :: how to make a global string c# 
Csharp :: unity find gameobject 
Csharp :: c# build string out of list of strings 
Csharp :: c# join string array 
Csharp :: get current assembly path c# 
Csharp :: how to remove all buttons on a form C# 
Csharp :: unity RemoveComponent 
Csharp :: c# unity detect any keyboard input but not mouse input 
Csharp :: .net framework get configuration value from web.config 
Csharp :: access to element in object c# 
Csharp :: distinct prime factors count of a number 
Csharp :: c# read authorization header 
Csharp :: yanderedev 
Csharp :: c# field vs property 
Csharp :: Unity Destroy gameObject upon collision 
Csharp :: c# unity 
Csharp :: list clone - C# 
Csharp :: Local to global position unity 
Csharp :: asp.net core get root url in view 
Csharp :: callback function on animation end unity 
Csharp :: operator -- c# 
Csharp :: generate entity model dot net core 
Csharp :: weapon switching unity 
Csharp :: parsing string to int c# 
Csharp :: how to create a list c# 
Csharp :: datetime check null c# 
Csharp :: show snackbar without scaffold flutter 
ADD CONTENT
Topic
Content
Source link
Name
3+2 =