Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

unity destroy object when out of screen

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

        Destroy (this.gameObject);
    
    }
Comment

PREVIOUS NEXT
Code Example
Csharp :: c# convert seconds to hours minutes seconds 
Csharp :: wpf choose file dialog 
Csharp :: insert variables into string c# 
Csharp :: c# list all files in a directory and subdirectory 
Csharp :: how to change the extension of a file C# 
Csharp :: unity main texture not working 
Csharp :: c# get next item in list 
Csharp :: unity object follow mouse 
Csharp :: c# System.Resources.MissingManifestResourceException error 
Csharp :: unity character controller ignore collision 
Csharp :: how to make a button open window in wpf 
Csharp :: messagebox.show c# error 
Csharp :: c# connection string 
Csharp :: unity c# reference link url 
Csharp :: how to find how much digits in number c# 
Csharp :: {} is this used for code blcoks in c# 
Csharp :: c# write text before user input 
Csharp :: unity system time 
Csharp :: C# multiple button click event to password textbox 
Csharp :: c# open file in default program 
Csharp :: how to get the color of other label when clicking c# 
Csharp :: an entry with the same key already exists asp net 
Csharp :: asp textarea 
Csharp :: c# loop 
Csharp :: elevated priviledge in c# 
Csharp :: unity agent bake not derecting mesh 
Csharp :: emboss button in android app 
Csharp :: c# xpath read attribute value 
Csharp :: c# get pixel color from image 
Csharp :: csharp check if env is development 
ADD CONTENT
Topic
Content
Source link
Name
6+3 =