コード例 #1
0
        public override Playable CreatePlayable(PlayableGraph graph, GameObject owner)
        {
            var playable = ScriptPlayable <RecorderPlayableBehaviour> .Create(graph);

            var behaviour = playable.GetBehaviour();

            if (recorderType != null && UnityHelpers.IsPlaying())
            {
                behaviour.session = new RecordingSession()
                {
                    m_Recorder   = RecordersInventory.GenerateNewRecorder(recorderType, m_Settings),
                    m_RecorderGO = SceneHook.HookupRecorder(),
                };
                behaviour.OnEnd = () =>
                {
                    try
                    {
                        if (OnClipDone != null)
                        {
                            OnClipDone(this);
                        }
                    }
                    catch (Exception ex)
                    {
                        Debug.Log("OnClipDone call back generated an exception: " + ex.Message);
                        Debug.LogException(ex);
                    }
                };
            }
            return(playable);
        }
コード例 #2
0
        public override Playable CreatePlayable(PlayableGraph graph, GameObject owner)
        {
            var playable = ScriptPlayable <RecorderPlayableBehaviour> .Create(graph);

            var behaviour = playable.GetBehaviour();

            if (recorderType != null && UnityHelpers.IsPlaying())
            {
                behaviour.session = m_SceneHook.CreateRecorderSession(settings);
            }
            return(playable);
        }
コード例 #3
0
ファイル: RecorderClip.cs プロジェクト: ZaK14120/ARS
        public override Playable CreatePlayable(PlayableGraph graph, GameObject owner)
        {
            var playable = ScriptPlayable <RecorderPlayableBehaviour> .Create(graph);

            var behaviour = playable.GetBehaviour();

            if (recorderType != null && UnityHelpers.IsPlaying())
            {
                behaviour.session = new RecordingSession()
                {
                    m_Recorder   = RecordersInventory.GenerateNewRecorder(recorderType, m_Settings),
                    m_RecorderGO = FrameRecorderGOControler.HookupRecorder(!m_Settings.m_Verbose),
                };
            }
            return(playable);
        }