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/.attestation.p7m
ADDED
|
Binary file
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "DREditor.DebugTesting",
|
|
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
|
-
],
|
|
24
|
-
"includePlatforms": [],
|
|
25
|
-
"excludePlatforms": [],
|
|
26
|
-
"allowUnsafeCode": false,
|
|
27
|
-
"overrideReferences": false,
|
|
28
|
-
"precompiledReferences": [],
|
|
29
|
-
"autoReferenced": true,
|
|
30
|
-
"defineConstraints": [],
|
|
31
|
-
"versionDefines": [],
|
|
32
|
-
"noEngineReferences": false
|
|
1
|
+
{
|
|
2
|
+
"name": "DREditor.DebugTesting",
|
|
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
|
+
],
|
|
24
|
+
"includePlatforms": [],
|
|
25
|
+
"excludePlatforms": [],
|
|
26
|
+
"allowUnsafeCode": false,
|
|
27
|
+
"overrideReferences": false,
|
|
28
|
+
"precompiledReferences": [],
|
|
29
|
+
"autoReferenced": true,
|
|
30
|
+
"defineConstraints": [],
|
|
31
|
+
"versionDefines": [],
|
|
32
|
+
"noEngineReferences": false
|
|
33
33
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
2
|
-
guid: 483c5aba8a74b1042bffd68bb699a642
|
|
3
|
-
AssemblyDefinitionImporter:
|
|
4
|
-
externalObjects: {}
|
|
5
|
-
userData:
|
|
6
|
-
assetBundleName:
|
|
7
|
-
assetBundleVariant:
|
|
1
|
+
fileFormatVersion: 2
|
|
2
|
+
guid: 483c5aba8a74b1042bffd68bb699a642
|
|
3
|
+
AssemblyDefinitionImporter:
|
|
4
|
+
externalObjects: {}
|
|
5
|
+
userData:
|
|
6
|
+
assetBundleName:
|
|
7
|
+
assetBundleVariant:
|
package/DebugTester.cs
CHANGED
|
@@ -1,176 +1,176 @@
|
|
|
1
|
-
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
-
using DREditor.Audio;
|
|
3
|
-
using DREditor.Dialogues.Events;
|
|
4
|
-
using DREditor.EventObjects;
|
|
5
|
-
using DREditor.Fading;
|
|
6
|
-
using DREditor.Gates;
|
|
7
|
-
using DREditor.Progressing.Handling;
|
|
8
|
-
using DREditor.RoomLoading;
|
|
9
|
-
using DREditor.Saving;
|
|
10
|
-
using DREditor.Services;
|
|
11
|
-
using DREditor.States;
|
|
12
|
-
using System.Collections;
|
|
13
|
-
using UnityEngine;
|
|
14
|
-
using UnityEngine.EventSystems;
|
|
15
|
-
using UnityEngine.InputSystem;
|
|
16
|
-
using UnityEngine.SceneManagement;
|
|
17
|
-
using static UnityEngine.InputSystem.InputAction;
|
|
18
|
-
|
|
19
|
-
namespace DREditor.DebugTesting
|
|
20
|
-
{
|
|
21
|
-
/// <summary>
|
|
22
|
-
///
|
|
23
|
-
/// </summary>
|
|
24
|
-
public class DebugTester : DebugTesterBase
|
|
25
|
-
{
|
|
26
|
-
/// <summary>
|
|
27
|
-
///
|
|
28
|
-
/// </summary>
|
|
29
|
-
[Header("")]
|
|
30
|
-
[Divider]
|
|
31
|
-
[Tooltip("")]
|
|
32
|
-
[SerializeField] protected InputActionReference startTest = null;
|
|
33
|
-
|
|
34
|
-
/// <summary>
|
|
35
|
-
///
|
|
36
|
-
/// </summary>
|
|
37
|
-
[Tooltip("")]
|
|
38
|
-
public StateDatabase stateDatabase = null;
|
|
39
|
-
|
|
40
|
-
/// <summary>
|
|
41
|
-
///
|
|
42
|
-
/// </summary>
|
|
43
|
-
[Tooltip("")]
|
|
44
|
-
public ScriptableObject pauseData = null;
|
|
45
|
-
|
|
46
|
-
/// <summary>
|
|
47
|
-
///
|
|
48
|
-
/// </summary>
|
|
49
|
-
[Space]
|
|
50
|
-
|
|
51
|
-
[Tooltip("")]
|
|
52
|
-
[SerializeField] protected SceneEvent newGameSelected = null;
|
|
53
|
-
|
|
54
|
-
/// <summary>
|
|
55
|
-
///
|
|
56
|
-
/// </summary>
|
|
57
|
-
[Tooltip("")]
|
|
58
|
-
[SerializeField] protected SceneEvent startedNewGame = null;
|
|
59
|
-
|
|
60
|
-
/// <summary>
|
|
61
|
-
///
|
|
62
|
-
/// </summary>
|
|
63
|
-
[Tooltip("")]
|
|
64
|
-
[SerializeField] protected BoolWithEvent hasLoadedSaveData = null;
|
|
65
|
-
|
|
66
|
-
/// <summary>
|
|
67
|
-
///
|
|
68
|
-
/// </summary>
|
|
69
|
-
[Tooltip("")]
|
|
70
|
-
[SerializeField] protected BoolWithEvent startedNewWithLoaded = null;
|
|
71
|
-
|
|
72
|
-
/// <summary>
|
|
73
|
-
///
|
|
74
|
-
/// </summary>
|
|
75
|
-
[Tooltip("")]
|
|
76
|
-
[SerializeField] protected TransformWithEvent playerSpawnPoint = null;
|
|
77
|
-
|
|
78
|
-
/// <summary>
|
|
79
|
-
///
|
|
80
|
-
/// </summary>
|
|
81
|
-
[Tooltip("")]
|
|
82
|
-
[SerializeField] protected IntWithEvent currentState = null;
|
|
83
|
-
|
|
84
|
-
/// <summary>
|
|
85
|
-
///
|
|
86
|
-
/// </summary>
|
|
87
|
-
[Tooltip("")]
|
|
88
|
-
[SerializeField] protected IntWithEvent currentChapterIndex = null;
|
|
89
|
-
|
|
90
|
-
/// <summary>
|
|
91
|
-
///
|
|
92
|
-
/// </summary>
|
|
93
|
-
[Tooltip("")]
|
|
94
|
-
[SerializeField] protected string generatePastEvent = "FadeOutGeneratePastOnDebugTest";
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
protected virtual void OnEnable() => startTest.action.started += StartNewGame;
|
|
98
|
-
|
|
99
|
-
protected virtual void OnDisable() => startTest.action.started -= StartNewGame;
|
|
100
|
-
|
|
101
|
-
/// <summary>
|
|
102
|
-
///
|
|
103
|
-
/// </summary>
|
|
104
|
-
/// <param name="ctx"></param>
|
|
105
|
-
protected virtual void StartNewGame(CallbackContext ctx)
|
|
106
|
-
{
|
|
107
|
-
FindAnyObjectByType<PlayerDataClearHandler>().Clear();
|
|
108
|
-
|
|
109
|
-
if (hasLoadedSaveData.Value)
|
|
110
|
-
{
|
|
111
|
-
startedNewWithLoaded.SetValue(true);
|
|
112
|
-
|
|
113
|
-
newGameSelected.Raise();
|
|
114
|
-
|
|
115
|
-
startedNewGame.Raise();
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
EventSystem.current.SetSelectedGameObject(null);
|
|
119
|
-
|
|
120
|
-
StartCoroutine(FadeIntoGame());
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
/// <summary>
|
|
124
|
-
///
|
|
125
|
-
/// </summary>
|
|
126
|
-
/// <returns></returns>
|
|
127
|
-
protected virtual IEnumerator FadeIntoGame()
|
|
128
|
-
{
|
|
129
|
-
newGameSelected.Raise();
|
|
130
|
-
|
|
131
|
-
startedNewGame.Raise();
|
|
132
|
-
|
|
133
|
-
// This section differs from the normal new game initialization logic.
|
|
134
|
-
currentChapterIndex.SetValue(chapterIndex);
|
|
135
|
-
|
|
136
|
-
ServiceLocator.GetService<ProgressionManagerBase>().SetCurrentObjective(objective);
|
|
137
|
-
|
|
138
|
-
if (toGate != null || (position == Vector3.zero && rotation == Vector3.zero))
|
|
139
|
-
OverrideFromGate(fromGate);
|
|
140
|
-
else
|
|
141
|
-
playerSpawnPoint.SetValue(new(position, Quaternion.Euler(rotation)));
|
|
142
|
-
|
|
143
|
-
currentState.SetValue(state);
|
|
144
|
-
|
|
145
|
-
ServiceLocator.GetService<MusicManagerBase>().FadeMusic(1f);
|
|
146
|
-
|
|
147
|
-
yield return ServiceLocator.GetService<GlobalFade>().FadeToRoutine(1);
|
|
148
|
-
|
|
149
|
-
ServiceLocator.GetService<RoomLoaderBase>().AllowRoomsToLoad();
|
|
150
|
-
|
|
151
|
-
if (GoToScene == "" && toGate != null)
|
|
152
|
-
GoToScene = toGate.ToAreaName;
|
|
153
|
-
|
|
154
|
-
SceneManager.LoadSceneAsync(GoToScene);
|
|
155
|
-
|
|
156
|
-
DialogueEventSystem.TriggerEvent(generatePastEvent);
|
|
157
|
-
|
|
158
|
-
yield break;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
/// <summary>
|
|
162
|
-
///
|
|
163
|
-
/// </summary>
|
|
164
|
-
/// <param name="fromG"></param>
|
|
165
|
-
protected virtual void OverrideFromGate(GateFrom fromG)
|
|
166
|
-
{
|
|
167
|
-
if (fromG != null)
|
|
168
|
-
UnityEngine.Debug.Log($"{ToString()}: OverrideFromGate: FromG was Null , most likely TPFD Area");
|
|
169
|
-
|
|
170
|
-
if (fromG != null)
|
|
171
|
-
playerSpawnPoint.SetValue(new(fromG.position, Quaternion.Euler(fromG.rotation)));
|
|
172
|
-
else
|
|
173
|
-
playerSpawnPoint.SetValue(new(Vector3.zero, Quaternion.Euler(Vector3.zero)));
|
|
174
|
-
}
|
|
175
|
-
}
|
|
1
|
+
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
+
using DREditor.Audio;
|
|
3
|
+
using DREditor.Dialogues.Events;
|
|
4
|
+
using DREditor.EventObjects;
|
|
5
|
+
using DREditor.Fading;
|
|
6
|
+
using DREditor.Gates;
|
|
7
|
+
using DREditor.Progressing.Handling;
|
|
8
|
+
using DREditor.RoomLoading;
|
|
9
|
+
using DREditor.Saving;
|
|
10
|
+
using DREditor.Services;
|
|
11
|
+
using DREditor.States;
|
|
12
|
+
using System.Collections;
|
|
13
|
+
using UnityEngine;
|
|
14
|
+
using UnityEngine.EventSystems;
|
|
15
|
+
using UnityEngine.InputSystem;
|
|
16
|
+
using UnityEngine.SceneManagement;
|
|
17
|
+
using static UnityEngine.InputSystem.InputAction;
|
|
18
|
+
|
|
19
|
+
namespace DREditor.DebugTesting
|
|
20
|
+
{
|
|
21
|
+
/// <summary>
|
|
22
|
+
///
|
|
23
|
+
/// </summary>
|
|
24
|
+
public class DebugTester : DebugTesterBase
|
|
25
|
+
{
|
|
26
|
+
/// <summary>
|
|
27
|
+
///
|
|
28
|
+
/// </summary>
|
|
29
|
+
[Header("")]
|
|
30
|
+
[Divider]
|
|
31
|
+
[Tooltip("")]
|
|
32
|
+
[SerializeField] protected InputActionReference startTest = null;
|
|
33
|
+
|
|
34
|
+
/// <summary>
|
|
35
|
+
///
|
|
36
|
+
/// </summary>
|
|
37
|
+
[Tooltip("")]
|
|
38
|
+
public StateDatabase stateDatabase = null;
|
|
39
|
+
|
|
40
|
+
/// <summary>
|
|
41
|
+
///
|
|
42
|
+
/// </summary>
|
|
43
|
+
[Tooltip("")]
|
|
44
|
+
public ScriptableObject pauseData = null;
|
|
45
|
+
|
|
46
|
+
/// <summary>
|
|
47
|
+
///
|
|
48
|
+
/// </summary>
|
|
49
|
+
[Space]
|
|
50
|
+
|
|
51
|
+
[Tooltip("")]
|
|
52
|
+
[SerializeField] protected SceneEvent newGameSelected = null;
|
|
53
|
+
|
|
54
|
+
/// <summary>
|
|
55
|
+
///
|
|
56
|
+
/// </summary>
|
|
57
|
+
[Tooltip("")]
|
|
58
|
+
[SerializeField] protected SceneEvent startedNewGame = null;
|
|
59
|
+
|
|
60
|
+
/// <summary>
|
|
61
|
+
///
|
|
62
|
+
/// </summary>
|
|
63
|
+
[Tooltip("")]
|
|
64
|
+
[SerializeField] protected BoolWithEvent hasLoadedSaveData = null;
|
|
65
|
+
|
|
66
|
+
/// <summary>
|
|
67
|
+
///
|
|
68
|
+
/// </summary>
|
|
69
|
+
[Tooltip("")]
|
|
70
|
+
[SerializeField] protected BoolWithEvent startedNewWithLoaded = null;
|
|
71
|
+
|
|
72
|
+
/// <summary>
|
|
73
|
+
///
|
|
74
|
+
/// </summary>
|
|
75
|
+
[Tooltip("")]
|
|
76
|
+
[SerializeField] protected TransformWithEvent playerSpawnPoint = null;
|
|
77
|
+
|
|
78
|
+
/// <summary>
|
|
79
|
+
///
|
|
80
|
+
/// </summary>
|
|
81
|
+
[Tooltip("")]
|
|
82
|
+
[SerializeField] protected IntWithEvent currentState = null;
|
|
83
|
+
|
|
84
|
+
/// <summary>
|
|
85
|
+
///
|
|
86
|
+
/// </summary>
|
|
87
|
+
[Tooltip("")]
|
|
88
|
+
[SerializeField] protected IntWithEvent currentChapterIndex = null;
|
|
89
|
+
|
|
90
|
+
/// <summary>
|
|
91
|
+
///
|
|
92
|
+
/// </summary>
|
|
93
|
+
[Tooltip("")]
|
|
94
|
+
[SerializeField] protected string generatePastEvent = "FadeOutGeneratePastOnDebugTest";
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
protected virtual void OnEnable() => startTest.action.started += StartNewGame;
|
|
98
|
+
|
|
99
|
+
protected virtual void OnDisable() => startTest.action.started -= StartNewGame;
|
|
100
|
+
|
|
101
|
+
/// <summary>
|
|
102
|
+
///
|
|
103
|
+
/// </summary>
|
|
104
|
+
/// <param name="ctx"></param>
|
|
105
|
+
protected virtual void StartNewGame(CallbackContext ctx)
|
|
106
|
+
{
|
|
107
|
+
FindAnyObjectByType<PlayerDataClearHandler>().Clear();
|
|
108
|
+
|
|
109
|
+
if (hasLoadedSaveData.Value)
|
|
110
|
+
{
|
|
111
|
+
startedNewWithLoaded.SetValue(true);
|
|
112
|
+
|
|
113
|
+
newGameSelected.Raise();
|
|
114
|
+
|
|
115
|
+
startedNewGame.Raise();
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
EventSystem.current.SetSelectedGameObject(null);
|
|
119
|
+
|
|
120
|
+
StartCoroutine(FadeIntoGame());
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/// <summary>
|
|
124
|
+
///
|
|
125
|
+
/// </summary>
|
|
126
|
+
/// <returns></returns>
|
|
127
|
+
protected virtual IEnumerator FadeIntoGame()
|
|
128
|
+
{
|
|
129
|
+
newGameSelected.Raise();
|
|
130
|
+
|
|
131
|
+
startedNewGame.Raise();
|
|
132
|
+
|
|
133
|
+
// This section differs from the normal new game initialization logic.
|
|
134
|
+
currentChapterIndex.SetValue(chapterIndex);
|
|
135
|
+
|
|
136
|
+
ServiceLocator.GetService<ProgressionManagerBase>().SetCurrentObjective(objective);
|
|
137
|
+
|
|
138
|
+
if (toGate != null || (position == Vector3.zero && rotation == Vector3.zero))
|
|
139
|
+
OverrideFromGate(fromGate);
|
|
140
|
+
else
|
|
141
|
+
playerSpawnPoint.SetValue(new(position, Quaternion.Euler(rotation)));
|
|
142
|
+
|
|
143
|
+
currentState.SetValue(state);
|
|
144
|
+
|
|
145
|
+
ServiceLocator.GetService<MusicManagerBase>().FadeMusic(1f);
|
|
146
|
+
|
|
147
|
+
yield return ServiceLocator.GetService<GlobalFade>().FadeToRoutine(1);
|
|
148
|
+
|
|
149
|
+
ServiceLocator.GetService<RoomLoaderBase>().AllowRoomsToLoad();
|
|
150
|
+
|
|
151
|
+
if (GoToScene == "" && toGate != null)
|
|
152
|
+
GoToScene = toGate.ToAreaName;
|
|
153
|
+
|
|
154
|
+
SceneManager.LoadSceneAsync(GoToScene);
|
|
155
|
+
|
|
156
|
+
DialogueEventSystem.TriggerEvent(generatePastEvent);
|
|
157
|
+
|
|
158
|
+
yield break;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/// <summary>
|
|
162
|
+
///
|
|
163
|
+
/// </summary>
|
|
164
|
+
/// <param name="fromG"></param>
|
|
165
|
+
protected virtual void OverrideFromGate(GateFrom fromG)
|
|
166
|
+
{
|
|
167
|
+
if (fromG != null)
|
|
168
|
+
UnityEngine.Debug.Log($"{ToString()}: OverrideFromGate: FromG was Null , most likely TPFD Area");
|
|
169
|
+
|
|
170
|
+
if (fromG != null)
|
|
171
|
+
playerSpawnPoint.SetValue(new(fromG.position, Quaternion.Euler(fromG.rotation)));
|
|
172
|
+
else
|
|
173
|
+
playerSpawnPoint.SetValue(new(Vector3.zero, Quaternion.Euler(Vector3.zero)));
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
176
|
}
|
package/DebugTester.cs.meta
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
2
|
-
guid: d921924d639c2104ca2c79eb67f94788
|
|
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: d921924d639c2104ca2c79eb67f94788
|
|
3
|
+
MonoImporter:
|
|
4
|
+
externalObjects: {}
|
|
5
|
+
serializedVersion: 2
|
|
6
|
+
defaultReferences: []
|
|
7
|
+
executionOrder: 0
|
|
8
|
+
icon: {instanceID: 0}
|
|
9
|
+
userData:
|
|
10
|
+
assetBundleName:
|
|
11
|
+
assetBundleVariant:
|