void Start() { if (InfoText != null) { BlendyController blendy = GetComponentInParent <BlendyController>(); if (blendy != null) { InfoText.text = "Screen: " + blendy.screenResolution + "\nSyphon: " + blendy.syphonResolution; } } }
void Awake() { _instance = this; // Make the game run even when in background Application.runInBackground = true; // Get first rig if (cameraRig == null) { cameraRig = FindObjectOfType <BlendyCameraRig>(); } Assert.IsTrue(cameraRig != null, "BlendyController needs at least one BlendyCameraRig in your scene. Drop the prefab!"); // GetShader _shader = GetComponentInChildren <ShFisheye>(); Assert.IsTrue(_shader != null); // Get Funnel _funnel = GetComponentInChildren <Funnel.Funnel>(); if (_funnel != null && _funnel.GetType().GetProperty("isDummy") != null) { Debug.Log("Funnel not installed!"); _funnel = null; } if (_funnel != null) { if (syphonResolution == SyphonResolution.Disabled) { _funnel.enabled = false; } else { _funnel.screenWidth = (int)syphonResolution; _funnel.screenHeight = (int)syphonResolution; } } // Get Debug layer Canvas canvas = GetComponentInChildren <Canvas>(); if (canvas != null) { _debugCanvas = canvas.transform; _cubemaps = _debugCanvas.Find("Cubemaps"); } }