net.dreditor.debugtesting 0.1.6 → 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.attestation.p7m +0 -0
- package/DREditor.DebugTesting.asmdef +32 -32
- package/DREditor.DebugTesting.asmdef.meta +7 -7
- package/DebugTester.cs +175 -175
- package/DebugTester.cs.meta +11 -11
- package/DebugTesterBase.cs +157 -157
- package/DebugTesterBase.cs.meta +11 -11
- package/Editor/DREditor.DebugTesting.Editor.asmdef +33 -33
- package/Editor/DREditor.DebugTesting.Editor.asmdef.meta +7 -7
- package/Editor/DebugTesterBaseEditor.cs +74 -74
- package/Editor/DebugTesterBaseEditor.cs.meta +11 -11
- package/Editor/DebugTesterEditor.cs +393 -393
- package/Editor/DebugTesterEditor.cs.meta +11 -11
- package/Editor.meta +8 -8
- package/{Samples → Samples~}/Debug_Tester_ETemplate.prefab +92 -92
- package/{Samples → Samples~}/Debug_Tester_ETemplate.prefab.meta +7 -7
- package/package.json +54 -49
- package/package.json.meta +7 -7
- package/Samples.meta +0 -8
package/DebugTesterBase.cs
CHANGED
|
@@ -1,158 +1,158 @@
|
|
|
1
|
-
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
-
using DREditor.Gates;
|
|
3
|
-
using DREditor.Progressing;
|
|
4
|
-
using UnityEngine;
|
|
5
|
-
|
|
6
|
-
namespace DREditor.DebugTesting
|
|
7
|
-
{
|
|
8
|
-
/// <summary>
|
|
9
|
-
///
|
|
10
|
-
/// </summary>
|
|
11
|
-
public class DebugTesterBase : MonoBehaviour
|
|
12
|
-
{
|
|
13
|
-
/// <summary>
|
|
14
|
-
///
|
|
15
|
-
/// </summary>
|
|
16
|
-
[HideInInspector]
|
|
17
|
-
public int state = 0;
|
|
18
|
-
|
|
19
|
-
/// <summary>
|
|
20
|
-
///
|
|
21
|
-
/// </summary>
|
|
22
|
-
[HideInInspector]
|
|
23
|
-
public int chapterIndex = 0;
|
|
24
|
-
|
|
25
|
-
/// <summary>
|
|
26
|
-
///
|
|
27
|
-
/// </summary>
|
|
28
|
-
[HideInInspector]
|
|
29
|
-
public Objective objective = null;
|
|
30
|
-
|
|
31
|
-
/// <summary>
|
|
32
|
-
///
|
|
33
|
-
/// </summary>
|
|
34
|
-
[HideInInspector]
|
|
35
|
-
public int objectiveIndex = 0;
|
|
36
|
-
|
|
37
|
-
/// <summary>
|
|
38
|
-
///
|
|
39
|
-
/// </summary>
|
|
40
|
-
[HideInInspector]
|
|
41
|
-
public string GoToScene = "";
|
|
42
|
-
|
|
43
|
-
/// <summary>
|
|
44
|
-
///
|
|
45
|
-
/// </summary>
|
|
46
|
-
[HideInInspector]
|
|
47
|
-
public Gate toGate = null;
|
|
48
|
-
|
|
49
|
-
/// <summary>
|
|
50
|
-
///
|
|
51
|
-
/// </summary>
|
|
52
|
-
[HideInInspector]
|
|
53
|
-
public int toGateIdx = 0;
|
|
54
|
-
|
|
55
|
-
/// <summary>
|
|
56
|
-
///
|
|
57
|
-
/// </summary>
|
|
58
|
-
[HideInInspector]
|
|
59
|
-
public GateFrom fromGate = null;
|
|
60
|
-
|
|
61
|
-
/// <summary>
|
|
62
|
-
///
|
|
63
|
-
/// </summary>
|
|
64
|
-
[HideInInspector]
|
|
65
|
-
public int fromGateIdx = 0;
|
|
66
|
-
|
|
67
|
-
/// <summary>
|
|
68
|
-
///
|
|
69
|
-
/// </summary>
|
|
70
|
-
[HideInInspector]
|
|
71
|
-
public int invGateIdx = -1;
|
|
72
|
-
|
|
73
|
-
/// <summary>
|
|
74
|
-
///
|
|
75
|
-
/// </summary>
|
|
76
|
-
[HideInInspector]
|
|
77
|
-
public Vector3 position = Vector3.zero;
|
|
78
|
-
|
|
79
|
-
/// <summary>
|
|
80
|
-
///
|
|
81
|
-
/// </summary>
|
|
82
|
-
[HideInInspector]
|
|
83
|
-
public Vector3 rotation = Vector3.zero;
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
/// <summary>
|
|
87
|
-
///
|
|
88
|
-
/// </summary>
|
|
89
|
-
/// <param name="state"></param>
|
|
90
|
-
public virtual void SetState(int state) => this.state = state;
|
|
91
|
-
|
|
92
|
-
/// <summary>
|
|
93
|
-
///
|
|
94
|
-
/// </summary>
|
|
95
|
-
/// <param name="chapterIndex"></param>
|
|
96
|
-
public virtual void SetChapterIndex(int chapterIndex) => this.chapterIndex = chapterIndex;
|
|
97
|
-
|
|
98
|
-
/// <summary>
|
|
99
|
-
///
|
|
100
|
-
/// </summary>
|
|
101
|
-
/// <param name="value"></param>
|
|
102
|
-
public virtual void SetObjective(Objective value) => objective = value;
|
|
103
|
-
|
|
104
|
-
/// <summary>
|
|
105
|
-
///
|
|
106
|
-
/// </summary>
|
|
107
|
-
/// <param name="value"></param>
|
|
108
|
-
public virtual void SetObjectiveIndex(int value) => objectiveIndex = value;
|
|
109
|
-
|
|
110
|
-
/// <summary>
|
|
111
|
-
///
|
|
112
|
-
/// </summary>
|
|
113
|
-
/// <param name="toGateIdx"></param>
|
|
114
|
-
/// <param name="toGate"></param>
|
|
115
|
-
public virtual void SetToGate(int toGateIdx, Gate toGate)
|
|
116
|
-
{
|
|
117
|
-
this.toGateIdx = toGateIdx;
|
|
118
|
-
|
|
119
|
-
this.toGate = toGate;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
/// <summary>
|
|
123
|
-
///
|
|
124
|
-
/// </summary>
|
|
125
|
-
/// <param name="fromGateIdx"></param>
|
|
126
|
-
/// <param name="fromGate"></param>
|
|
127
|
-
public virtual void SetFromGate(int fromGateIdx, GateFrom fromGate)
|
|
128
|
-
{
|
|
129
|
-
this.fromGateIdx = fromGateIdx;
|
|
130
|
-
|
|
131
|
-
this.fromGate = fromGate;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
/// <summary>
|
|
135
|
-
///
|
|
136
|
-
/// </summary>
|
|
137
|
-
/// <param name="GoToScene"></param>
|
|
138
|
-
/// <param name="invGateIdx"></param>
|
|
139
|
-
public virtual void SetInvestigationScene(string GoToScene, int invGateIdx)
|
|
140
|
-
{
|
|
141
|
-
this.GoToScene = GoToScene;
|
|
142
|
-
|
|
143
|
-
this.invGateIdx = invGateIdx;
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
/// <summary>
|
|
147
|
-
///
|
|
148
|
-
/// </summary>
|
|
149
|
-
/// <param name="position"></param>
|
|
150
|
-
/// <param name="rotation"></param>
|
|
151
|
-
public virtual void SetPositionAndRotation(Vector3 position, Vector3 rotation)
|
|
152
|
-
{
|
|
153
|
-
this.position = position;
|
|
154
|
-
|
|
155
|
-
this.rotation = rotation;
|
|
156
|
-
}
|
|
157
|
-
}
|
|
1
|
+
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
+
using DREditor.Gates;
|
|
3
|
+
using DREditor.Progressing;
|
|
4
|
+
using UnityEngine;
|
|
5
|
+
|
|
6
|
+
namespace DREditor.DebugTesting
|
|
7
|
+
{
|
|
8
|
+
/// <summary>
|
|
9
|
+
///
|
|
10
|
+
/// </summary>
|
|
11
|
+
public class DebugTesterBase : MonoBehaviour
|
|
12
|
+
{
|
|
13
|
+
/// <summary>
|
|
14
|
+
///
|
|
15
|
+
/// </summary>
|
|
16
|
+
[HideInInspector]
|
|
17
|
+
public int state = 0;
|
|
18
|
+
|
|
19
|
+
/// <summary>
|
|
20
|
+
///
|
|
21
|
+
/// </summary>
|
|
22
|
+
[HideInInspector]
|
|
23
|
+
public int chapterIndex = 0;
|
|
24
|
+
|
|
25
|
+
/// <summary>
|
|
26
|
+
///
|
|
27
|
+
/// </summary>
|
|
28
|
+
[HideInInspector]
|
|
29
|
+
public Objective objective = null;
|
|
30
|
+
|
|
31
|
+
/// <summary>
|
|
32
|
+
///
|
|
33
|
+
/// </summary>
|
|
34
|
+
[HideInInspector]
|
|
35
|
+
public int objectiveIndex = 0;
|
|
36
|
+
|
|
37
|
+
/// <summary>
|
|
38
|
+
///
|
|
39
|
+
/// </summary>
|
|
40
|
+
[HideInInspector]
|
|
41
|
+
public string GoToScene = "";
|
|
42
|
+
|
|
43
|
+
/// <summary>
|
|
44
|
+
///
|
|
45
|
+
/// </summary>
|
|
46
|
+
[HideInInspector]
|
|
47
|
+
public Gate toGate = null;
|
|
48
|
+
|
|
49
|
+
/// <summary>
|
|
50
|
+
///
|
|
51
|
+
/// </summary>
|
|
52
|
+
[HideInInspector]
|
|
53
|
+
public int toGateIdx = 0;
|
|
54
|
+
|
|
55
|
+
/// <summary>
|
|
56
|
+
///
|
|
57
|
+
/// </summary>
|
|
58
|
+
[HideInInspector]
|
|
59
|
+
public GateFrom fromGate = null;
|
|
60
|
+
|
|
61
|
+
/// <summary>
|
|
62
|
+
///
|
|
63
|
+
/// </summary>
|
|
64
|
+
[HideInInspector]
|
|
65
|
+
public int fromGateIdx = 0;
|
|
66
|
+
|
|
67
|
+
/// <summary>
|
|
68
|
+
///
|
|
69
|
+
/// </summary>
|
|
70
|
+
[HideInInspector]
|
|
71
|
+
public int invGateIdx = -1;
|
|
72
|
+
|
|
73
|
+
/// <summary>
|
|
74
|
+
///
|
|
75
|
+
/// </summary>
|
|
76
|
+
[HideInInspector]
|
|
77
|
+
public Vector3 position = Vector3.zero;
|
|
78
|
+
|
|
79
|
+
/// <summary>
|
|
80
|
+
///
|
|
81
|
+
/// </summary>
|
|
82
|
+
[HideInInspector]
|
|
83
|
+
public Vector3 rotation = Vector3.zero;
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
/// <summary>
|
|
87
|
+
///
|
|
88
|
+
/// </summary>
|
|
89
|
+
/// <param name="state"></param>
|
|
90
|
+
public virtual void SetState(int state) => this.state = state;
|
|
91
|
+
|
|
92
|
+
/// <summary>
|
|
93
|
+
///
|
|
94
|
+
/// </summary>
|
|
95
|
+
/// <param name="chapterIndex"></param>
|
|
96
|
+
public virtual void SetChapterIndex(int chapterIndex) => this.chapterIndex = chapterIndex;
|
|
97
|
+
|
|
98
|
+
/// <summary>
|
|
99
|
+
///
|
|
100
|
+
/// </summary>
|
|
101
|
+
/// <param name="value"></param>
|
|
102
|
+
public virtual void SetObjective(Objective value) => objective = value;
|
|
103
|
+
|
|
104
|
+
/// <summary>
|
|
105
|
+
///
|
|
106
|
+
/// </summary>
|
|
107
|
+
/// <param name="value"></param>
|
|
108
|
+
public virtual void SetObjectiveIndex(int value) => objectiveIndex = value;
|
|
109
|
+
|
|
110
|
+
/// <summary>
|
|
111
|
+
///
|
|
112
|
+
/// </summary>
|
|
113
|
+
/// <param name="toGateIdx"></param>
|
|
114
|
+
/// <param name="toGate"></param>
|
|
115
|
+
public virtual void SetToGate(int toGateIdx, Gate toGate)
|
|
116
|
+
{
|
|
117
|
+
this.toGateIdx = toGateIdx;
|
|
118
|
+
|
|
119
|
+
this.toGate = toGate;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/// <summary>
|
|
123
|
+
///
|
|
124
|
+
/// </summary>
|
|
125
|
+
/// <param name="fromGateIdx"></param>
|
|
126
|
+
/// <param name="fromGate"></param>
|
|
127
|
+
public virtual void SetFromGate(int fromGateIdx, GateFrom fromGate)
|
|
128
|
+
{
|
|
129
|
+
this.fromGateIdx = fromGateIdx;
|
|
130
|
+
|
|
131
|
+
this.fromGate = fromGate;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/// <summary>
|
|
135
|
+
///
|
|
136
|
+
/// </summary>
|
|
137
|
+
/// <param name="GoToScene"></param>
|
|
138
|
+
/// <param name="invGateIdx"></param>
|
|
139
|
+
public virtual void SetInvestigationScene(string GoToScene, int invGateIdx)
|
|
140
|
+
{
|
|
141
|
+
this.GoToScene = GoToScene;
|
|
142
|
+
|
|
143
|
+
this.invGateIdx = invGateIdx;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/// <summary>
|
|
147
|
+
///
|
|
148
|
+
/// </summary>
|
|
149
|
+
/// <param name="position"></param>
|
|
150
|
+
/// <param name="rotation"></param>
|
|
151
|
+
public virtual void SetPositionAndRotation(Vector3 position, Vector3 rotation)
|
|
152
|
+
{
|
|
153
|
+
this.position = position;
|
|
154
|
+
|
|
155
|
+
this.rotation = rotation;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
158
|
}
|
package/DebugTesterBase.cs.meta
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
2
|
-
guid: 01307d444e5fe304487ebe6882b5d607
|
|
3
|
-
MonoImporter:
|
|
4
|
-
externalObjects: {}
|
|
5
|
-
serializedVersion: 2
|
|
6
|
-
defaultReferences: []
|
|
7
|
-
executionOrder: 0
|
|
8
|
-
icon: {instanceID: 0}
|
|
9
|
-
userData:
|
|
10
|
-
assetBundleName:
|
|
11
|
-
assetBundleVariant:
|
|
1
|
+
fileFormatVersion: 2
|
|
2
|
+
guid: 01307d444e5fe304487ebe6882b5d607
|
|
3
|
+
MonoImporter:
|
|
4
|
+
externalObjects: {}
|
|
5
|
+
serializedVersion: 2
|
|
6
|
+
defaultReferences: []
|
|
7
|
+
executionOrder: 0
|
|
8
|
+
icon: {instanceID: 0}
|
|
9
|
+
userData:
|
|
10
|
+
assetBundleName:
|
|
11
|
+
assetBundleVariant:
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "DREditor.DebugTesting.Editor",
|
|
3
|
-
"rootNamespace": "",
|
|
4
|
-
"references": [
|
|
5
|
-
"Unity.RenderPipelines.Universal.Runtime",
|
|
6
|
-
"Unity.InputSystem",
|
|
7
|
-
"DREditor.Editor",
|
|
8
|
-
"DREditor",
|
|
9
|
-
"DREditor.Controls",
|
|
10
|
-
"DREditor.Audio",
|
|
11
|
-
"DREditor.Fading",
|
|
12
|
-
"DREditor.Progressing.Handling",
|
|
13
|
-
"DREditor.DialogueMechanics.Investigation",
|
|
14
|
-
"DREditor.RoomLoading",
|
|
15
|
-
"DREditor.RoomStateBuilding",
|
|
16
|
-
"DREditor.RoomBuilding",
|
|
17
|
-
"DREditor.Actors",
|
|
18
|
-
"DREditor.Doors",
|
|
19
|
-
"DREditor.SubAreas",
|
|
20
|
-
"DREditor.Talkables",
|
|
21
|
-
"DREditor.Triggers",
|
|
22
|
-
"DREditor.States",
|
|
23
|
-
"DREditor.DebugTesting"
|
|
24
|
-
],
|
|
25
|
-
"includePlatforms": [],
|
|
26
|
-
"excludePlatforms": [],
|
|
27
|
-
"allowUnsafeCode": false,
|
|
28
|
-
"overrideReferences": false,
|
|
29
|
-
"precompiledReferences": [],
|
|
30
|
-
"autoReferenced": true,
|
|
31
|
-
"defineConstraints": [],
|
|
32
|
-
"versionDefines": [],
|
|
33
|
-
"noEngineReferences": false
|
|
1
|
+
{
|
|
2
|
+
"name": "DREditor.DebugTesting.Editor",
|
|
3
|
+
"rootNamespace": "",
|
|
4
|
+
"references": [
|
|
5
|
+
"Unity.RenderPipelines.Universal.Runtime",
|
|
6
|
+
"Unity.InputSystem",
|
|
7
|
+
"DREditor.Editor",
|
|
8
|
+
"DREditor",
|
|
9
|
+
"DREditor.Controls",
|
|
10
|
+
"DREditor.Audio",
|
|
11
|
+
"DREditor.Fading",
|
|
12
|
+
"DREditor.Progressing.Handling",
|
|
13
|
+
"DREditor.DialogueMechanics.Investigation",
|
|
14
|
+
"DREditor.RoomLoading",
|
|
15
|
+
"DREditor.RoomStateBuilding",
|
|
16
|
+
"DREditor.RoomBuilding",
|
|
17
|
+
"DREditor.Actors",
|
|
18
|
+
"DREditor.Doors",
|
|
19
|
+
"DREditor.SubAreas",
|
|
20
|
+
"DREditor.Talkables",
|
|
21
|
+
"DREditor.Triggers",
|
|
22
|
+
"DREditor.States",
|
|
23
|
+
"DREditor.DebugTesting"
|
|
24
|
+
],
|
|
25
|
+
"includePlatforms": [],
|
|
26
|
+
"excludePlatforms": [],
|
|
27
|
+
"allowUnsafeCode": false,
|
|
28
|
+
"overrideReferences": false,
|
|
29
|
+
"precompiledReferences": [],
|
|
30
|
+
"autoReferenced": true,
|
|
31
|
+
"defineConstraints": [],
|
|
32
|
+
"versionDefines": [],
|
|
33
|
+
"noEngineReferences": false
|
|
34
34
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
2
|
-
guid: b3c9b90e902c87d4b8a9373d098e634f
|
|
3
|
-
AssemblyDefinitionImporter:
|
|
4
|
-
externalObjects: {}
|
|
5
|
-
userData:
|
|
6
|
-
assetBundleName:
|
|
7
|
-
assetBundleVariant:
|
|
1
|
+
fileFormatVersion: 2
|
|
2
|
+
guid: b3c9b90e902c87d4b8a9373d098e634f
|
|
3
|
+
AssemblyDefinitionImporter:
|
|
4
|
+
externalObjects: {}
|
|
5
|
+
userData:
|
|
6
|
+
assetBundleName:
|
|
7
|
+
assetBundleVariant:
|
|
@@ -1,75 +1,75 @@
|
|
|
1
|
-
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
-
#if UNITY_EDITOR
|
|
3
|
-
using UnityEditor;
|
|
4
|
-
using UnityEngine;
|
|
5
|
-
|
|
6
|
-
namespace DREditor.DebugTesting.Editor
|
|
7
|
-
{
|
|
8
|
-
/// <summary>
|
|
9
|
-
///
|
|
10
|
-
/// </summary>
|
|
11
|
-
public abstract class DebugTesterBaseEditor : UnityEditor.Editor
|
|
12
|
-
{
|
|
13
|
-
/// <summary>
|
|
14
|
-
///
|
|
15
|
-
/// </summary>
|
|
16
|
-
protected bool eventFoldout = false;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
/// <inheritdoc/>
|
|
20
|
-
public override void OnInspectorGUI()
|
|
21
|
-
{
|
|
22
|
-
if (!PassInitialization())
|
|
23
|
-
return;
|
|
24
|
-
|
|
25
|
-
serializedObject.Update();
|
|
26
|
-
|
|
27
|
-
CreateForm();
|
|
28
|
-
|
|
29
|
-
serializedObject.ApplyModifiedProperties();
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
/// <summary>
|
|
33
|
-
///
|
|
34
|
-
/// </summary>
|
|
35
|
-
/// <returns></returns>
|
|
36
|
-
protected abstract bool PassInitialization();
|
|
37
|
-
|
|
38
|
-
/// <summary>
|
|
39
|
-
///
|
|
40
|
-
/// </summary>
|
|
41
|
-
protected virtual void CreateForm()
|
|
42
|
-
{
|
|
43
|
-
SaveChangesButton();
|
|
44
|
-
|
|
45
|
-
DisplayEventFields();
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
/// <summary>
|
|
49
|
-
///
|
|
50
|
-
/// </summary>
|
|
51
|
-
protected virtual void SaveChangesButton()
|
|
52
|
-
{
|
|
53
|
-
if (GUILayout.Button("Save Changes", GUILayout.Width(100)))
|
|
54
|
-
EditorUtility.SetDirty(target);
|
|
55
|
-
|
|
56
|
-
GUILayout.Space(20);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
/// <summary>
|
|
60
|
-
///
|
|
61
|
-
/// </summary>
|
|
62
|
-
protected virtual void DisplayEventFields()
|
|
63
|
-
{
|
|
64
|
-
eventFoldout = EditorGUILayout.BeginFoldoutHeaderGroup(eventFoldout, "Initialized Objects and Events");
|
|
65
|
-
|
|
66
|
-
if (eventFoldout)
|
|
67
|
-
DrawDefaultInspector();
|
|
68
|
-
|
|
69
|
-
EditorGUILayout.EndFoldoutHeaderGroup();
|
|
70
|
-
|
|
71
|
-
GUILayout.Space(10);
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
}
|
|
1
|
+
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
+
#if UNITY_EDITOR
|
|
3
|
+
using UnityEditor;
|
|
4
|
+
using UnityEngine;
|
|
5
|
+
|
|
6
|
+
namespace DREditor.DebugTesting.Editor
|
|
7
|
+
{
|
|
8
|
+
/// <summary>
|
|
9
|
+
///
|
|
10
|
+
/// </summary>
|
|
11
|
+
public abstract class DebugTesterBaseEditor : UnityEditor.Editor
|
|
12
|
+
{
|
|
13
|
+
/// <summary>
|
|
14
|
+
///
|
|
15
|
+
/// </summary>
|
|
16
|
+
protected bool eventFoldout = false;
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
/// <inheritdoc/>
|
|
20
|
+
public override void OnInspectorGUI()
|
|
21
|
+
{
|
|
22
|
+
if (!PassInitialization())
|
|
23
|
+
return;
|
|
24
|
+
|
|
25
|
+
serializedObject.Update();
|
|
26
|
+
|
|
27
|
+
CreateForm();
|
|
28
|
+
|
|
29
|
+
serializedObject.ApplyModifiedProperties();
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/// <summary>
|
|
33
|
+
///
|
|
34
|
+
/// </summary>
|
|
35
|
+
/// <returns></returns>
|
|
36
|
+
protected abstract bool PassInitialization();
|
|
37
|
+
|
|
38
|
+
/// <summary>
|
|
39
|
+
///
|
|
40
|
+
/// </summary>
|
|
41
|
+
protected virtual void CreateForm()
|
|
42
|
+
{
|
|
43
|
+
SaveChangesButton();
|
|
44
|
+
|
|
45
|
+
DisplayEventFields();
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/// <summary>
|
|
49
|
+
///
|
|
50
|
+
/// </summary>
|
|
51
|
+
protected virtual void SaveChangesButton()
|
|
52
|
+
{
|
|
53
|
+
if (GUILayout.Button("Save Changes", GUILayout.Width(100)))
|
|
54
|
+
EditorUtility.SetDirty(target);
|
|
55
|
+
|
|
56
|
+
GUILayout.Space(20);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/// <summary>
|
|
60
|
+
///
|
|
61
|
+
/// </summary>
|
|
62
|
+
protected virtual void DisplayEventFields()
|
|
63
|
+
{
|
|
64
|
+
eventFoldout = EditorGUILayout.BeginFoldoutHeaderGroup(eventFoldout, "Initialized Objects and Events");
|
|
65
|
+
|
|
66
|
+
if (eventFoldout)
|
|
67
|
+
DrawDefaultInspector();
|
|
68
|
+
|
|
69
|
+
EditorGUILayout.EndFoldoutHeaderGroup();
|
|
70
|
+
|
|
71
|
+
GUILayout.Space(10);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
75
|
#endif
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
2
|
-
guid: 790e42b969798d640af6202641dce49b
|
|
3
|
-
MonoImporter:
|
|
4
|
-
externalObjects: {}
|
|
5
|
-
serializedVersion: 2
|
|
6
|
-
defaultReferences: []
|
|
7
|
-
executionOrder: 0
|
|
8
|
-
icon: {instanceID: 0}
|
|
9
|
-
userData:
|
|
10
|
-
assetBundleName:
|
|
11
|
-
assetBundleVariant:
|
|
1
|
+
fileFormatVersion: 2
|
|
2
|
+
guid: 790e42b969798d640af6202641dce49b
|
|
3
|
+
MonoImporter:
|
|
4
|
+
externalObjects: {}
|
|
5
|
+
serializedVersion: 2
|
|
6
|
+
defaultReferences: []
|
|
7
|
+
executionOrder: 0
|
|
8
|
+
icon: {instanceID: 0}
|
|
9
|
+
userData:
|
|
10
|
+
assetBundleName:
|
|
11
|
+
assetBundleVariant:
|