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
Also in C#:
- c# declare an int list
- ecs get specific entities with component
- c# download string url
- c# try catch error
- c# read a webpage data
- how to goto a website using linklabel c#
- how to select time and date in datetimepicker in c#
- c# serialize
- unity inspector header attribute
- sticky footer bootstrap 3
- how to update modal class using dbfirst in asp.net core
- asp.net c# write string to text file
- send type as argument c#
- c# post request
- c# static meaning
- c# save pdf to folder
- nunit return parameter
- unity check when clicked on object
- How to get number of months between 2 dates c#
- unity left mouse button
- c# null conditional
- out parameters c#
- c# string remove special characters
- creating a c# class