示例#1
0
 /// <summary>
 /// Checks the running camera.
 /// </summary>
 void checkRunningCamera()
 {
     if (mCamera != null && mCamera.isPlaying() && mCamera.Width() > 100)
     {
         CancelInvoke("checkRunningCamera");
         this.rawimg.transform.localEulerAngles = mCamera.GetRotation();
         this.rawimg.transform.localScale       = mCamera.getVideoScale();
         RectTransform component = this.rawimg.GetComponent <RectTransform>();
         float         y         = component.sizeDelta.x * (float)this.mCamera.Height() / (float)this.mCamera.Width();
         component.sizeDelta = new Vector2(component.sizeDelta.x, y);
     }
 }