// only works in standalone void Start() { if (Screen.fullScreen) { can = gameObject.GetComponent <Canvas>(); Debug.Log("displays connected: " + Display.displays.Length); // Display.displays[0] is the primary, default display and is always ON. // Check if additional displays are available and activate each. if (Display.displays.Length > 1) { //If second monitor connected if (!Display.displays[1].active) { Display.displays[1].Activate(); //Activate monitor } can.targetDisplay = 1; //render to second monitor MixCast.SetActive(true); } } }
public void toggleCamera() { MixCast.SetActive(!(MixCast.Active)); }
/// <summary> /// Sets all Mix Cast Cameras within the scene to value passed in. /// </summary> /// <param name="val">Value you want for cameras within scene</param> public static void CamerazSet(bool val) { MixCast.SetActive(val); }