protected virtual void OnDisable() { if (LOSManager.TryGetInstance() != null) // Have to check in case the manager is destroyed when scene end. { LOSManager.instance.RemoveObstacle(this); } }
protected virtual void OnDisable() { if (LOSManager.TryGetInstance() != null) { LOSManager.instance.RemoveLight(this); } }
protected virtual void OnDisable () { if (LOSManager.TryGetInstance() != null) { LOSManager.instance.RemoveLight(this); } if (GetComponent<Renderer>() != null) { GetComponent<Renderer>().enabled = false; } }
protected virtual void OnDisable() { if (LOSManager.TryGetInstance() != null) { LOSManager.instance.RemoveLight(this); } if (renderer != null) { renderer.enabled = false; } }
private void Init() { _instance = this; UpdateViewingBox(); }