static UsdWaitForEndOfFrame GetInstance()
 {
     if (s_instance == null)
     {
         s_instance = GameObject.FindObjectOfType <UsdWaitForEndOfFrame>();
         if (s_instance == null)
         {
             var go = new GameObject();
             go.name      = "UsdRecorderHelper";
             go.hideFlags = HideFlags.HideAndDontSave;
             s_instance   = go.AddComponent <UsdWaitForEndOfFrame>();
         }
     }
     return(s_instance);
 }
Exemplo n.º 2
0
        public override void ProcessFrame(Playable playable, FrameData info, object playerData)
        {
            if (!IsPlaying())
            {
                return;
            }
            var frameRate = Time.captureFramerate;

            if (frameRate < 1)
            {
                frameRate = Application.targetFrameRate;
            }

            UsdWaitForEndOfFrame.Add(() => OnFrameEnd(playable, info, playerData));
        }