unity on deactivate code example
Example 1: unity deactive code from code
public MonoBehaviour script;
void Start()
{
script.enabled = false;
}
Example 2: deactivate a gameobject unity
public void SetActive(bool value);
public MonoBehaviour script;
void Start()
{
script.enabled = false;
}
public void SetActive(bool value);