Tanoda
TransitionAfterPlayable.cs
Go to the documentation of this file.
1/******************************************************************************
2 * Copyright (C) Ultraleap, Inc. 2011-2020. *
3 * *
4 * Use subject to the terms of the Apache License 2.0 available at *
5 * http://www.apache.org/licenses/LICENSE-2.0, or another agreement *
6 * between Ultraleap and you, your company or other organization. *
7 ******************************************************************************/
8
9using UnityEngine;
10using UnityEngine.Playables;
11
12namespace Leap.Unity.Recording {
13
15
16 #pragma warning disable 0649
17 [SerializeField]
18 private PlayableDirector _director;
19 #pragma warning restore 0649
20
21 private bool _hasStartedPlaying = false;
22
23 private void OnEnable() {
24 _hasStartedPlaying = false;
25 }
26
27 private void Update() {
28 if (_hasStartedPlaying) {
29 if (_director.state != PlayState.Playing) {
30 Transition();
31 }
32 } else if (_director.state == PlayState.Playing) {
33 _hasStartedPlaying = true;
34 }
35
36 Debug.Log(_director.state);
37 }
38 }
39}
UnityEngine.Debug Debug
Definition: TanodaServer.cs:19