void CreateNewSignalAsset() { var path = SignalUtility.GetNewSignalPath(); if (!string.IsNullOrEmpty(path)) { ((ISignalAssetProvider)this).CreateNewSignalAsset(path); } }
void DrawSignal() { //should show button to create new signal if there are no signals asset in the project if (!SignalManager.assets.Any()) { using (new EditorGUI.DisabledScope(true)) { DrawNameSelector(); } EditorGUILayout.Separator(); SignalUtility.DrawCenteredMessage(Styles.ProjectHasNoSignalAsset); if (SignalUtility.DrawCenteredButton(Styles.CreateNewSignal)) { CreateNewSignalAsset(SignalUtility.GetNewSignalPath()); } EditorGUILayout.Separator(); } else { DrawNameSelector(); } }