unity on setactive object code example Example: setactive unity gameObject.SetActive(true); gameObject.SetActive(false);