Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

how to disable a gameObject unity c#

public GameObject gameObj;//the gameobject you want to disable in the scene

        gameObj.SetActive(true); //set the object to active
        gameObj.SetActive(false);//set the object to disable

        gameObject.SetActive(true);//change the state of the current gameobject to active
        gameObject.SetActive(false);//change the state of the current gameobject to disable
Comment

how to deactivate an object unity

Object.SetActive(true / false);
Comment

deactivate a gameobject unity

public void SetActive(bool value);
Comment

PREVIOUS NEXT
Code Example
Csharp :: C# System.nanoTime 
Csharp :: how to change color of part from the text in textblock wpf 
Csharp :: aspx element visibility ould not find 
Csharp :: loading player preferences unity 
Csharp :: context.Response.Body read stream .net 
Csharp :: push c# array 
Csharp :: ASP.net ApplicationUser referance not found 
Csharp :: c sharp teleporting 
Csharp :: unitry raycast 
Csharp :: superscript list 
Csharp :: Screen.lockcursor unity 
Csharp :: how to customize xunit input 
Csharp :: Rotating an object in Unity usign Physics 
Csharp :: C# top down view player movement 
Csharp :: telerik winforms get value of selected rows from grid 
Csharp :: Merge two List using Linq 
Csharp :: Getting the text from a drop-down box 
Csharp :: c# try parse date yyyymmdd 
Csharp :: c# code to check anagram 
Csharp :: get current location latitude and longitude in xamarin - NAYCode.com 
Csharp :: entityframework index 
Csharp :: c# decimal 4 casas decimais 
Csharp :: concatenate two lists in c# 
Csharp :: how to check if button is pressed unity 
Csharp :: c# copy all files in directory and subdirectories 
Csharp :: c# anonymous type as return value 
Csharp :: how to return array in function c# 
Csharp :: by value by reference c# 
Csharp :: quaternion to euler 
Csharp :: .net using appsettings variables 
ADD CONTENT
Topic
Content
Source link
Name
8+8 =