public static void DrawRemoteTalkTrackSettings() { EditorGUI.BeginChangeCheck(); var pauseWhenExport = EditorGUILayout.Toggle("Pause When Export", RemoteTalkTrack.pauseWhenExport); if (EditorGUI.EndChangeCheck()) { RemoteTalkTrack.pauseWhenExport = pauseWhenExport; } EditorGUI.BeginChangeCheck(); var fitDuration = EditorGUILayout.Toggle("Fit Duration", RemoteTalkTrack.fitDuration); if (EditorGUI.EndChangeCheck()) { RemoteTalkTrack.fitDuration = fitDuration; } if (fitDuration) { EditorGUI.indentLevel++; EditorGUI.BeginChangeCheck(); var arrangeScope = (RemoteTalkTrack.ArrangeScope)EditorGUILayout.EnumPopup("Arrange Clips", RemoteTalkTrack.arrangeClips); if (EditorGUI.EndChangeCheck()) { RemoteTalkTrack.arrangeClips = arrangeScope; } EditorGUI.indentLevel--; } EditorGUILayout.Space(); EditorGUILayout.BeginHorizontal(); if (GUILayout.Button("Import Text")) { ImportTextWindow.Open(); } if (GUILayout.Button("Export Text")) { var filename = "RemoteTalkTimeline"; if (Misc.currentTimeline) { filename = Misc.currentTimeline.name; } RemoteTalkTrack.ExportText(EditorUtility.SaveFilePanel("Export Text", ".", filename, "txt")); } EditorGUILayout.EndHorizontal(); EditorGUILayout.Space(); if (GUILayout.Button("Convet To AudioTrack")) { RemoteTalkTrack.ConvertToAudioTrack(); Misc.RefreshTimelineWindow(); } }
void OnGUI() { EditorGUI.BeginDisabledGroup(true); GUILayout.TextField(path); EditorGUI.EndDisabledGroup(); options.parCastTrack = EditorGUILayout.Toggle("Tracks For Each Cast", options.parCastTrack); options.startTime = EditorGUILayout.DoubleField("Start Time", options.startTime); options.interval = EditorGUILayout.DoubleField("Interval", options.interval); if (GUILayout.Button("Create Timeline Track")) { RemoteTalkTrack.ImportText(path, options); Close(); } }