public void ValidateFields() { string content = fileNameInputfield.text; bool isValid = true; if (content == string.Empty) { DisplayError(fileNameInputfield, "Field required"); isValid = false; } if (content.Contains(".txt")) { DisplayError(fileNameInputfield, "Remove the extension"); isValid = false; } if (isValid) { DisplayError(fileNameInputfield); TabsEditorManager inst = TabsEditorManager.standalone; if (inst == null) { return; } inst.CreateNewTabs(content); } }
void Awake() { if (standalone != null) { Debug.LogError("StandAlone is called twice"); } standalone = this; }
public void OnTrackSelected() { TabsEditorManager inst = TabsEditorManager.standalone; if (inst == null) { return; } inst.CreateNewTabs(TrackName); }
private void OnDestroy() { standalone = null; }