protected virtual void OnDisable() { if(PipController) { PipController.enabled = false; } cachedController = null; demoButtons.Clear(); }
protected virtual void OnEnable() { if(PipController) { PipController.enabled = false; AddButton(KeyCode.P, "Control Player", "Control PiP", PressedPip); } cachedController = GetComponent<SECTR_FPSController>(); passedIntro = string.IsNullOrEmpty(DemoMessage) || CaptureMode; if(!passedIntro) { cachedController.enabled = false; if(PipController) { PipController.GetComponent<Camera>().enabled = false; } } }