void OnGUI() { if (_mto == null) { return; } int bw = Screen.width / 3; int bh = bw / 2; int by = Screen.height - bh; bool isPlaying = _mto.IsPlaying(); if (GUI.Button(new Rect(0, by, bw, bh), isPlaying? "Pause" : "Play")) { if (isPlaying) { _mto.Pause(); } else { _mto.Play(); } } else if (GUI.Button(new Rect(bw, by, bw, bh), "Rewind")) { _mto.Rewind(); } }
public void Pause() { if (mto == null) { return; } mto.Pause(); }