private void Awake() { m_Toggle = GetComponent <Toggle>(); m_IsOn = m_Toggle.isOn; m_TweenerDirector = GetComponent <TweenerDirector>(); m_TweenerDirector.Seek(m_IsOn ? 1 : 0); }
public override void OnInspectorGUI() { TweenerDirector target = (TweenerDirector)this.target; DrawDefaultInspector(); EditorGUI.BeginDisabledGroup(Application.isPlaying); EditorGUI.BeginChangeCheck(); m_Time = EditorGUILayout.Slider(s_Style.time, m_Time, 0f, 1f); if (EditorGUI.EndChangeCheck()) { target.Seek(m_Time); } EditorGUI.EndDisabledGroup(); }
public async Task Play() { m_TweenerDirector.Seek(0); await m_TweenerDirector.PlayForwardsAsync(); }