Exemplo n.º 1
0
 protected void StartRendering(bool needQuad)
 {
     if (needQuad)
     {
         this.quadGameObject = new GameObject(string.Format("{0} Quad", this.name));
         this.quadGameObject.transform.position   = this.unityCamera.gameObject.transform.position - new Vector3((float)Screen.width * 0.5f, 0.5f, (float)Screen.height * 0.5f);
         this.quadGameObject.transform.localScale = new Vector3((float)Screen.width, 0f, (float)Screen.height);
         this.quadMesh = UnityUtils.CreateQuadMesh(0f);
         UnityUtils.SetupMeshMaterial(this.quadGameObject, this.quadMesh, this.quadMaterial);
         UnityUtils.SetLayerRecursively(this.quadGameObject, this.unityCamera.gameObject.layer);
     }
     else
     {
         this.quadGameObject = null;
     }
     this.unityCamera.enabled = true;
 }