Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

unity destroy object invisible

 //INSIDE ON YOUR OBJECT'S SCRIPT
 
 void OnBecameInvisible() {

        Destroy (this.gameObject);
    
    }
Comment

PREVIOUS NEXT
Code Example
Csharp :: lat long data type c# 
Csharp :: c# iterate over a dictionary 
Csharp :: how to move a gameobject 
Csharp :: how to get the position of a camera in unity 
Csharp :: define a vector c# 
Csharp :: audio source pause unity 
Csharp :: merge point of two list 
Csharp :: Prevent player rotation unity 
Csharp :: tooltips unity 
Csharp :: c# append textbox 
Csharp :: unity how get random color to material 
Csharp :: asp.net get query string parameter 
Csharp :: odd or even in c# 
Csharp :: C# How to write Hello World 
Csharp :: c# object to dictionary 
Csharp :: c# read file current directory 
Csharp :: c# letters only 
Csharp :: c# get month number 
Csharp :: base64 decode how used in c# 
Csharp :: c# substring from end 
Csharp :: untiy instanciate prefab 
Csharp :: instantiate unity 
Csharp :: get current assembly path c# 
Csharp :: get layermask from gameobject layer unity 
Csharp :: unity c# log an error or warning 
Csharp :: c# byte array to file 
Csharp :: yanderedev 
Csharp :: c# cast to int 
Csharp :: how to get integer value from textbox in c# 
Csharp :: contains c# 
ADD CONTENT
Topic
Content
Source link
Name
3+1 =