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

Commit d84a1f6

Browse files
Fixed issue where serialized fields wouldn't be included in build, causing runtime warnings
1 parent 760effa commit d84a1f6

File tree

4 files changed

+2
-12
lines changed

4 files changed

+2
-12
lines changed

Assets/SO Architecture/Events/Game Events/GameEventBase.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,9 @@ public abstract class GameEventBase<T> : GameEventBase, IGameEvent<T>, IStackTra
66
private readonly List<IGameEventListener<T>> _typedListeners = new List<IGameEventListener<T>>();
77
private readonly List<System.Action<T>> _typedActions = new List<System.Action<T>>();
88

9-
#if UNITY_EDITOR
109
[SerializeField]
1110
protected T _debugValue;
12-
#endif
11+
1312
public void Raise(T value)
1413
{
1514
AddStackTrace(value);

Assets/SO Architecture/Events/Listeners/BaseGameEventListener.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,9 @@ public abstract class BaseGameEventListener<TType, TEvent, TResponse> : Debuggab
1919
private TEvent _event;
2020
[SerializeField]
2121
private TResponse _response;
22-
23-
#if UNITY_EDITOR
22+
2423
[SerializeField]
2524
protected TType _debugValue;
26-
#endif
2725

2826
public void OnEventRaised(TType value)
2927
{
@@ -117,7 +115,6 @@ private void Register()
117115
}
118116
public abstract class DebuggableGameEventListener : SOArchitectureBaseMonobehaviour, IStackTraceObject
119117
{
120-
#if UNITY_EDITOR
121118
#pragma warning disable 0414
122119
[SerializeField]
123120
private bool _showDebugFields = false;
@@ -126,7 +123,6 @@ public abstract class DebuggableGameEventListener : SOArchitectureBaseMonobehavi
126123
private bool _enableGizmoDebugging = true;
127124
[SerializeField]
128125
private Color _debugColor = Color.cyan;
129-
#endif
130126

131127
public List<StackTraceEntry> StackTraces { get { return _stackTraces; } }
132128
private List<StackTraceEntry> _stackTraces = new List<StackTraceEntry>();

Assets/SO Architecture/Utility/SOArchitectureBaseMonobehaviour.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,8 @@
66
/// </summary>
77
public abstract class SOArchitectureBaseMonobehaviour : MonoBehaviour
88
{
9-
10-
#if UNITY_EDITOR
119
#pragma warning disable 0414
1210
[SerializeField]
1311
private DeveloperDescription DeveloperDescription = new DeveloperDescription();
1412
#pragma warning restore
15-
#endif
1613
}

Assets/SO Architecture/Utility/SOArchitectureBaseObject.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,8 @@
66
/// </summary>
77
public abstract class SOArchitectureBaseObject : ScriptableObject
88
{
9-
#if UNITY_EDITOR
109
#pragma warning disable 0414
1110
[SerializeField]
1211
private DeveloperDescription DeveloperDescription = new DeveloperDescription();
1312
#pragma warning restore
14-
#endif
1513
}

0 commit comments

Comments
 (0)