Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

make an object disappear from a c# script unity

public GameObject ObjectToDisappear;

void Start()
{
	ObjectToDisappear.GetComponent<Renderer>().enabled = false;
}
Comment

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;
   }
 }
Comment

PREVIOUS NEXT
Code Example
Csharp :: c# get month number 
Csharp :: c# get all the column names from datagridview 
Csharp :: Razor foreach loop 
Csharp :: c# wpf change label text color 
Csharp :: c# write variable in string 
Csharp :: .net Core Get File Request 
Csharp :: make window not resizable wpf 
Csharp :: selenium open chrome c# 
Csharp :: unity assembly 
Csharp :: unity topdown 
Csharp :: C# How to read users input and display it 
Csharp :: clear controls from panel c# 
Csharp :: this in unity 
Csharp :: unity how to get the side ways velocity of a object 
Csharp :: rotating an object in unity 
Csharp :: c# shuffle 
Csharp :: scaffold single table to model ef core 
Csharp :: c# combobox selected item 
Csharp :: disable rigidbody unity 
Csharp :: unity icons 
Csharp :: c# cast to int 
Csharp :: c# underscore variable 
Csharp :: enumerable.range contains 
Csharp :: prevent asp button from postback 
Csharp :: add row count devepxress report 
Csharp :: c# xor byte array 
Csharp :: c# input 
Csharp :: unity pause game c# 
Csharp :: c# list object sort alphabetically 
Csharp :: c# datagridview change selected row color 
ADD CONTENT
Topic
Content
Source link
Name
2+2 =