Esempio n. 1
0
        void CreateNewSignalAsset()
        {
            var path = SignalUtility.GetNewSignalPath();

            if (!string.IsNullOrEmpty(path))
            {
                ((ISignalAssetProvider)this).CreateNewSignalAsset(path);
            }
        }
Esempio n. 2
0
        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();
            }
        }