Esempio n. 1
0
 void OnRenderObject()
 {
     if (renderMode == RenderMode.Plugin)
     {
         UnityEngine.Camera cam = UnityEngine.Camera.current;
         if (cam)
         {
             Matrix4x4 view = cam.worldToCameraMatrix;
             Matrix4x4 proj = cam.projectionMatrix;
             Vector3   pos  = cam.transform.position;
             MPAPI.mpSetViewProjectionMatrix(ref view, ref proj, ref pos);
         }
         GL.IssuePluginEvent(1);
     }
 }