Skip to content
This repository was archived by the owner on May 9, 2025. It is now read-only.

Commit 26a2a28

Browse files
Disabled some editor elements when not playing
1 parent e7aeac9 commit 26a2a28

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

Assets/SO Architecture/Editor/Inspectors/GameEventEditor.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,14 @@ public override void OnInspectorGUI()
4646
}
4747
private void DrawRaiseButton()
4848
{
49+
EditorGUI.BeginDisabledGroup(!Application.isPlaying);
50+
4951
if (GUILayout.Button("Raise"))
5052
{
5153
Target.Raise();
5254
}
55+
56+
EditorGUI.EndDisabledGroup();
5357
}
5458
private void DrawStackTrace()
5559
{

Assets/SO Architecture/Events/GameEventListener.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@ static Styles()
7070

7171
private void OnDrawGizmos()
7272
{
73-
UpdateDebugInfo();
73+
if(Application.isPlaying)
74+
UpdateDebugInfo();
7475
}
7576
private void UpdateDebugInfo()
7677
{

0 commit comments

Comments
 (0)