Skip to content

Commit 623f269

Browse files
committed
Add missing gameevent editor scripts
1 parent a809096 commit 623f269

19 files changed

+199
-6
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
using UnityEditor;
2+
3+
namespace RaCoding.GameEvents
4+
{
5+
[CustomEditor(typeof(GameEvent<bool>), editorForChildClasses: true)]
6+
public class BoolGameEventEditor : GameEventEditor<bool>
7+
{
8+
protected override bool GetValue()
9+
{
10+
return EditorGUILayout.Toggle(false);
11+
}
12+
}
13+
}

Packages/SOGameEvents/Editor/BoolGameEventEditor.cs.meta

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
using UnityEditor;
2+
3+
namespace RaCoding.GameEvents
4+
{
5+
[CustomEditor(typeof(GameEvent<byte>), editorForChildClasses: true)]
6+
public class ByteGameEventEditor : GameEventEditor<byte>
7+
{
8+
protected override byte GetValue()
9+
{
10+
return (byte)EditorGUILayout.IntField(1);
11+
}
12+
}
13+
}

Packages/SOGameEvents/Editor/ByteGameEventEditor.cs.meta

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
using UnityEditor;
2+
3+
namespace RaCoding.GameEvents
4+
{
5+
[CustomEditor(typeof(GameEvent<char>), editorForChildClasses: true)]
6+
public class CharGameEventEditor : GameEventEditor<char>
7+
{
8+
protected override char GetValue()
9+
{
10+
return (char)EditorGUILayout.IntField(1);
11+
}
12+
}
13+
}

Packages/SOGameEvents/Editor/CharGameEventEditor.cs.meta

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
using UnityEditor;
2+
using UnityEngine;
3+
4+
namespace RaCoding.GameEvents
5+
{
6+
[CustomEditor(typeof(GameEvent<Color>), editorForChildClasses: true)]
7+
public class ColorGameEventEditor : GameEventEditor<Color>
8+
{
9+
protected override Color GetValue()
10+
{
11+
Vector4 colorVector4 = EditorGUILayout.Vector4Field("Color", new Vector4(1, 1, 1, 1));
12+
return new Color(colorVector4.x, colorVector4.y, colorVector4.z, colorVector4.w);
13+
}
14+
}
15+
}

Packages/SOGameEvents/Editor/ColorGameEventEditor.cs.meta

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Packages/SOGameEvents/Editor/QuaternionGameEventEditor.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ namespace RaCoding.GameEvents
66
[CustomEditor(typeof(GameEvent<Quaternion>), editorForChildClasses: true)]
77
public class QuaternionGameEventEditor : GameEventEditor<Quaternion>
88
{
9-
public Quaternion quaternion;
10-
119
protected override Quaternion GetValue()
1210
{
1311
Vector4 quaternionVector4 = EditorGUILayout.Vector4Field("Quaternion", new Vector4(1, 1, 1, 1));
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
using UnityEditor;
2+
3+
namespace RaCoding.GameEvents
4+
{
5+
[CustomEditor(typeof(GameEvent<short>), editorForChildClasses: true)]
6+
public class ShortGameEventEditor : GameEventEditor<short>
7+
{
8+
protected override short GetValue()
9+
{
10+
return (short)EditorGUILayout.IntField(1);
11+
}
12+
}
13+
}

0 commit comments

Comments
 (0)