void OnDisable() { Object[] cameras = GameObject.FindObjectsOfType(typeof(OutlineEffect)); foreach (Object c in cameras) { OutlineEffect effect = c as OutlineEffect; effect.RemoveOutline(this); } }
private void Awake() { if (Instance != null) { Destroy(this); throw new System.Exception("you can only have one outline camera in the scene"); } Instance = this; }
private void Awake() { m_instance = this; }