protected void LinkMediaReadies() { if (mediaReadyCallbacks.Count > 0) { this.leftReadyScript = LinkSingleMediaReady(this.leftIcMat); this.rightReadyScript = LinkSingleMediaReady(this.rightIcMat); } }
protected override void DoUpdate() { if (this.leftReadyScript && this.rightReadyScript) { if (this.leftReadyScript.ready && this.rightReadyScript.ready) { Destroy(this.leftReadyScript); Destroy(this.rightReadyScript); this.leftReadyScript = null; this.rightReadyScript = null; AllMediaReady(); } } }
protected StereoMediaReady LinkSingleMediaReady(icMaterial stereoChildMat) { if (stereoChildMat) { StereoMediaReady mrScript = this.gameObject.AddComponent <StereoMediaReady>(); mrScript.enabled = false; stereoChildMat.mediaReadyCallbacks.Add(mrScript); return(mrScript); } else { return(null); } }