From 8325c7fdf3d09b928bdf841af3ab9a8bc1ce1cb8 Mon Sep 17 00:00:00 2001 From: Varneon Date: Sun, 8 Jan 2023 17:12:07 -0800 Subject: [PATCH 1/5] Add Advanced foldout to UdonConsole inspector --- Packages/com.varneon.vudon.logger/Editor/UdonConsoleEditor.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Packages/com.varneon.vudon.logger/Editor/UdonConsoleEditor.cs b/Packages/com.varneon.vudon.logger/Editor/UdonConsoleEditor.cs index 4bf484b..44eb820 100644 --- a/Packages/com.varneon.vudon.logger/Editor/UdonConsoleEditor.cs +++ b/Packages/com.varneon.vudon.logger/Editor/UdonConsoleEditor.cs @@ -25,6 +25,7 @@ protected override void OnInspectorVisualTreeAssetCloned(VisualElement root) VisualElement inspectorPanel = root.Q("InspectorPanel"); inspectorPanel.Add(new Foldout() { name = "Foldout_Settings", text = "Settings" }); + inspectorPanel.Add(new Foldout() { name = "Foldout_Advanced", text = "Advanced" }); inspectorPanel.Add(new Foldout() { name = "Foldout_References", text = "References" }); inspectorPanel.Add(new Foldout() { name = "Foldout_API", text = "API" }); From 6e64f2ddb77290c7ac0801efbdcace7998c81624 Mon Sep 17 00:00:00 2001 From: Varneon Date: Sun, 8 Jan 2023 17:23:55 -0800 Subject: [PATCH 2/5] Add system prefix field --- .../Runtime/Udon Programs/UdonConsole.asset | 197 +++++++++++++----- .../Runtime/Udon Programs/UdonConsole.cs | 22 +- 2 files changed, 155 insertions(+), 64 deletions(-) diff --git a/Packages/com.varneon.vudon.logger/Runtime/Udon Programs/UdonConsole.asset b/Packages/com.varneon.vudon.logger/Runtime/Udon Programs/UdonConsole.asset index 3fc76e5..61c8a1e 100644 --- a/Packages/com.varneon.vudon.logger/Runtime/Udon Programs/UdonConsole.asset +++ b/Packages/com.varneon.vudon.logger/Runtime/Udon Programs/UdonConsole.asset @@ -44,7 +44,7 @@ MonoBehaviour: Data: - Name: Entry: 12 - Data: 16 + Data: 17 - Name: Entry: 7 Data: @@ -480,19 +480,19 @@ MonoBehaviour: Data: - Name: $k Entry: 1 - Data: logWindow + Data: systemPrefix - Name: $v Entry: 7 Data: 32|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor - Name: k__BackingField Entry: 1 - Data: logWindow + Data: systemPrefix - Name: k__BackingField Entry: 7 Data: 33|System.RuntimeType, mscorlib - Name: Entry: 1 - Data: UnityEngine.RectTransform, UnityEngine.CoreModule + Data: System.String, mscorlib - Name: Entry: 8 Data: @@ -531,7 +531,7 @@ MonoBehaviour: Data: 36|UnityEngine.HeaderAttribute, UnityEngine.CoreModule - Name: header Entry: 1 - Data: References + Data: Advanced - Name: Entry: 8 Data: @@ -546,7 +546,7 @@ MonoBehaviour: Data: 38|Varneon.VInspector.FieldParentElementAttribute, Varneon.V-Inspector.Runtime - Name: ParentName Entry: 1 - Data: Foldout_References + Data: Foldout_Advanced - Name: Entry: 8 Data: @@ -567,19 +567,19 @@ MonoBehaviour: Data: - Name: $k Entry: 1 - Data: logItem + Data: logWindow - Name: $v Entry: 7 Data: 39|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor - Name: k__BackingField Entry: 1 - Data: logItem + Data: logWindow - Name: k__BackingField Entry: 7 Data: 40|System.RuntimeType, mscorlib - Name: Entry: 1 - Data: UnityEngine.GameObject, UnityEngine.CoreModule + Data: UnityEngine.RectTransform, UnityEngine.CoreModule - Name: Entry: 8 Data: @@ -601,18 +601,105 @@ MonoBehaviour: - Name: _fieldAttributes Entry: 7 Data: 41|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib + - Name: + Entry: 12 + Data: 4 + - Name: + Entry: 7 + Data: 42|UnityEngine.SpaceAttribute, UnityEngine.CoreModule + - Name: height + Entry: 4 + Data: 8 + - Name: + Entry: 8 + Data: + - Name: + Entry: 7 + Data: 43|UnityEngine.HeaderAttribute, UnityEngine.CoreModule + - Name: header + Entry: 1 + Data: References + - Name: + Entry: 8 + Data: + - Name: + Entry: 7 + Data: 44|UnityEngine.SerializeField, UnityEngine.CoreModule + - Name: + Entry: 8 + Data: + - Name: + Entry: 7 + Data: 45|Varneon.VInspector.FieldParentElementAttribute, Varneon.V-Inspector.Runtime + - Name: ParentName + Entry: 1 + Data: Foldout_References + - Name: + Entry: 8 + Data: + - Name: + Entry: 13 + Data: + - Name: + Entry: 8 + Data: + - Name: + Entry: 8 + Data: + - Name: + Entry: 8 + Data: + - Name: + Entry: 7 + Data: + - Name: $k + Entry: 1 + Data: logItem + - Name: $v + Entry: 7 + Data: 46|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor + - Name: k__BackingField + Entry: 1 + Data: logItem + - Name: k__BackingField + Entry: 7 + Data: 47|System.RuntimeType, mscorlib + - Name: + Entry: 1 + Data: UnityEngine.GameObject, UnityEngine.CoreModule + - Name: + Entry: 8 + Data: + - Name: k__BackingField + Entry: 9 + Data: 47 + - Name: k__BackingField + Entry: 7 + Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib + - Name: + Entry: 6 + Data: + - Name: + Entry: 8 + Data: + - Name: k__BackingField + Entry: 5 + Data: true + - Name: _fieldAttributes + Entry: 7 + Data: 48|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib - Name: Entry: 12 Data: 2 - Name: Entry: 7 - Data: 42|UnityEngine.SerializeField, UnityEngine.CoreModule + Data: 49|UnityEngine.SerializeField, UnityEngine.CoreModule - Name: Entry: 8 Data: - Name: Entry: 7 - Data: 43|Varneon.VInspector.FieldParentElementAttribute, Varneon.V-Inspector.Runtime + Data: 50|Varneon.VInspector.FieldParentElementAttribute, Varneon.V-Inspector.Runtime - Name: ParentName Entry: 1 Data: Foldout_References @@ -639,13 +726,13 @@ MonoBehaviour: Data: logToggle - Name: $v Entry: 7 - Data: 44|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor + Data: 51|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor - Name: k__BackingField Entry: 1 Data: logToggle - Name: k__BackingField Entry: 7 - Data: 45|System.RuntimeType, mscorlib + Data: 52|System.RuntimeType, mscorlib - Name: Entry: 1 Data: UnityEngine.UI.Toggle, UnityEngine.UI @@ -654,7 +741,7 @@ MonoBehaviour: Data: - Name: k__BackingField Entry: 9 - Data: 45 + Data: 52 - Name: k__BackingField Entry: 7 Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib @@ -669,19 +756,19 @@ MonoBehaviour: Data: true - Name: _fieldAttributes Entry: 7 - Data: 46|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib + Data: 53|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib - Name: Entry: 12 Data: 2 - Name: Entry: 7 - Data: 47|UnityEngine.SerializeField, UnityEngine.CoreModule + Data: 54|UnityEngine.SerializeField, UnityEngine.CoreModule - Name: Entry: 8 Data: - Name: Entry: 7 - Data: 48|Varneon.VInspector.FieldParentElementAttribute, Varneon.V-Inspector.Runtime + Data: 55|Varneon.VInspector.FieldParentElementAttribute, Varneon.V-Inspector.Runtime - Name: ParentName Entry: 1 Data: Foldout_References @@ -708,16 +795,16 @@ MonoBehaviour: Data: warningToggle - Name: $v Entry: 7 - Data: 49|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor + Data: 56|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor - Name: k__BackingField Entry: 1 Data: warningToggle - Name: k__BackingField Entry: 9 - Data: 45 + Data: 52 - Name: k__BackingField Entry: 9 - Data: 45 + Data: 52 - Name: k__BackingField Entry: 7 Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib @@ -732,19 +819,19 @@ MonoBehaviour: Data: true - Name: _fieldAttributes Entry: 7 - Data: 50|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib + Data: 57|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib - Name: Entry: 12 Data: 2 - Name: Entry: 7 - Data: 51|UnityEngine.SerializeField, UnityEngine.CoreModule + Data: 58|UnityEngine.SerializeField, UnityEngine.CoreModule - Name: Entry: 8 Data: - Name: Entry: 7 - Data: 52|Varneon.VInspector.FieldParentElementAttribute, Varneon.V-Inspector.Runtime + Data: 59|Varneon.VInspector.FieldParentElementAttribute, Varneon.V-Inspector.Runtime - Name: ParentName Entry: 1 Data: Foldout_References @@ -771,16 +858,16 @@ MonoBehaviour: Data: errorToggle - Name: $v Entry: 7 - Data: 53|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor + Data: 60|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor - Name: k__BackingField Entry: 1 Data: errorToggle - Name: k__BackingField Entry: 9 - Data: 45 + Data: 52 - Name: k__BackingField Entry: 9 - Data: 45 + Data: 52 - Name: k__BackingField Entry: 7 Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib @@ -795,19 +882,19 @@ MonoBehaviour: Data: true - Name: _fieldAttributes Entry: 7 - Data: 54|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib + Data: 61|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib - Name: Entry: 12 Data: 2 - Name: Entry: 7 - Data: 55|UnityEngine.SerializeField, UnityEngine.CoreModule + Data: 62|UnityEngine.SerializeField, UnityEngine.CoreModule - Name: Entry: 8 Data: - Name: Entry: 7 - Data: 56|Varneon.VInspector.FieldParentElementAttribute, Varneon.V-Inspector.Runtime + Data: 63|Varneon.VInspector.FieldParentElementAttribute, Varneon.V-Inspector.Runtime - Name: ParentName Entry: 1 Data: Foldout_References @@ -834,16 +921,16 @@ MonoBehaviour: Data: timestampsToggle - Name: $v Entry: 7 - Data: 57|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor + Data: 64|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor - Name: k__BackingField Entry: 1 Data: timestampsToggle - Name: k__BackingField Entry: 9 - Data: 45 + Data: 52 - Name: k__BackingField Entry: 9 - Data: 45 + Data: 52 - Name: k__BackingField Entry: 7 Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib @@ -858,19 +945,19 @@ MonoBehaviour: Data: true - Name: _fieldAttributes Entry: 7 - Data: 58|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib + Data: 65|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib - Name: Entry: 12 Data: 2 - Name: Entry: 7 - Data: 59|UnityEngine.SerializeField, UnityEngine.CoreModule + Data: 66|UnityEngine.SerializeField, UnityEngine.CoreModule - Name: Entry: 8 Data: - Name: Entry: 7 - Data: 60|Varneon.VInspector.FieldParentElementAttribute, Varneon.V-Inspector.Runtime + Data: 67|Varneon.VInspector.FieldParentElementAttribute, Varneon.V-Inspector.Runtime - Name: ParentName Entry: 1 Data: Foldout_References @@ -897,13 +984,13 @@ MonoBehaviour: Data: maxLogEntriesField - Name: $v Entry: 7 - Data: 61|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor + Data: 68|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor - Name: k__BackingField Entry: 1 Data: maxLogEntriesField - Name: k__BackingField Entry: 7 - Data: 62|System.RuntimeType, mscorlib + Data: 69|System.RuntimeType, mscorlib - Name: Entry: 1 Data: UnityEngine.UI.InputField, UnityEngine.UI @@ -912,7 +999,7 @@ MonoBehaviour: Data: - Name: k__BackingField Entry: 9 - Data: 62 + Data: 69 - Name: k__BackingField Entry: 7 Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib @@ -927,19 +1014,19 @@ MonoBehaviour: Data: true - Name: _fieldAttributes Entry: 7 - Data: 63|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib + Data: 70|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib - Name: Entry: 12 Data: 2 - Name: Entry: 7 - Data: 64|UnityEngine.SerializeField, UnityEngine.CoreModule + Data: 71|UnityEngine.SerializeField, UnityEngine.CoreModule - Name: Entry: 8 Data: - Name: Entry: 7 - Data: 65|Varneon.VInspector.FieldParentElementAttribute, Varneon.V-Inspector.Runtime + Data: 72|Varneon.VInspector.FieldParentElementAttribute, Varneon.V-Inspector.Runtime - Name: ParentName Entry: 1 Data: Foldout_References @@ -966,16 +1053,16 @@ MonoBehaviour: Data: fontSizeField - Name: $v Entry: 7 - Data: 66|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor + Data: 73|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor - Name: k__BackingField Entry: 1 Data: fontSizeField - Name: k__BackingField Entry: 9 - Data: 62 + Data: 69 - Name: k__BackingField Entry: 9 - Data: 62 + Data: 69 - Name: k__BackingField Entry: 7 Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib @@ -990,19 +1077,19 @@ MonoBehaviour: Data: true - Name: _fieldAttributes Entry: 7 - Data: 67|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib + Data: 74|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib - Name: Entry: 12 Data: 2 - Name: Entry: 7 - Data: 68|UnityEngine.SerializeField, UnityEngine.CoreModule + Data: 75|UnityEngine.SerializeField, UnityEngine.CoreModule - Name: Entry: 8 Data: - Name: Entry: 7 - Data: 69|Varneon.VInspector.FieldParentElementAttribute, Varneon.V-Inspector.Runtime + Data: 76|Varneon.VInspector.FieldParentElementAttribute, Varneon.V-Inspector.Runtime - Name: ParentName Entry: 1 Data: Foldout_References @@ -1029,13 +1116,13 @@ MonoBehaviour: Data: scrollbar - Name: $v Entry: 7 - Data: 70|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor + Data: 77|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor - Name: k__BackingField Entry: 1 Data: scrollbar - Name: k__BackingField Entry: 7 - Data: 71|System.RuntimeType, mscorlib + Data: 78|System.RuntimeType, mscorlib - Name: Entry: 1 Data: UnityEngine.UI.Scrollbar, UnityEngine.UI @@ -1044,7 +1131,7 @@ MonoBehaviour: Data: - Name: k__BackingField Entry: 9 - Data: 71 + Data: 78 - Name: k__BackingField Entry: 7 Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib @@ -1059,7 +1146,7 @@ MonoBehaviour: Data: false - Name: _fieldAttributes Entry: 7 - Data: 72|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib + Data: 79|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib - Name: Entry: 12 Data: 0 @@ -1083,16 +1170,16 @@ MonoBehaviour: Data: canvasRoot - Name: $v Entry: 7 - Data: 73|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor + Data: 80|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor - Name: k__BackingField Entry: 1 Data: canvasRoot - Name: k__BackingField Entry: 9 - Data: 33 + Data: 40 - Name: k__BackingField Entry: 9 - Data: 33 + Data: 40 - Name: k__BackingField Entry: 7 Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib @@ -1107,7 +1194,7 @@ MonoBehaviour: Data: false - Name: _fieldAttributes Entry: 7 - Data: 74|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib + Data: 81|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib - Name: Entry: 12 Data: 0 diff --git a/Packages/com.varneon.vudon.logger/Runtime/Udon Programs/UdonConsole.cs b/Packages/com.varneon.vudon.logger/Runtime/Udon Programs/UdonConsole.cs index 6f859a4..d4c7fb0 100644 --- a/Packages/com.varneon.vudon.logger/Runtime/Udon Programs/UdonConsole.cs +++ b/Packages/com.varneon.vudon.logger/Runtime/Udon Programs/UdonConsole.cs @@ -46,6 +46,12 @@ public class UdonConsole : UdonLogger [FieldParentElement("Foldout_Settings")] private bool proxyEntriesToLogs; + [Space] + [Header("Advanced")] + [SerializeField] + [FieldParentElement("Foldout_Advanced")] + private string systemPrefix = "[UdonConsole]:"; + [Space] [Header("References")] [SerializeField] @@ -72,8 +78,6 @@ public class UdonConsole : UdonLogger #endregion #region Constants - private const string LOG_PREFIX = "[UdonConsole]:"; - private const string JOIN_PREFIX = "[JOIN]", LEAVE_PREFIX = "[LEAVE]"; @@ -97,11 +101,11 @@ private void Start() scrollbar = GetComponentInChildren(true); canvasRoot = GetComponentInChildren(true).GetComponent(); - Log($"{LOG_PREFIX} This is Varneon's Udon Essentials Console!"); - LogWarning($"{LOG_PREFIX} It can show warnings if something is out of the ordinary"); - LogError($"{LOG_PREFIX} And errors can also be shown if something goes completely wrong"); - Log($"{LOG_PREFIX} Context objects are also supported:", this); - Log($"{LOG_PREFIX} As well as assertions:"); + Log($"{systemPrefix} This is Varneon's Udon Essentials Console!"); + LogWarning($"{systemPrefix} It can show warnings if something is out of the ordinary"); + LogError($"{systemPrefix} And errors can also be shown if something goes completely wrong"); + Log($"{systemPrefix} Context objects are also supported:", this); + Log($"{systemPrefix} As well as assertions:"); Assert(false, null); } @@ -290,14 +294,14 @@ public override void ClearLogs(LogType logType) #region Player Events public override void OnPlayerJoined(VRCPlayerApi player) { - Log(string.Join(WHITESPACE, new string[] { LOG_PREFIX, JOIN_PREFIX, player.displayName })); + Log(string.Join(WHITESPACE, new string[] { systemPrefix, JOIN_PREFIX, player.displayName })); } public override void OnPlayerLeft(VRCPlayerApi player) { if (!Utilities.IsValid(player)) { return; } - Log(string.Join(WHITESPACE, new string[] { LOG_PREFIX, LEAVE_PREFIX, player.displayName })); + Log(string.Join(WHITESPACE, new string[] { systemPrefix, LEAVE_PREFIX, player.displayName })); } #endregion From 92c05e3f3e8bb9acf54113109295927245cd3f4c Mon Sep 17 00:00:00 2001 From: Varneon Date: Sun, 8 Jan 2023 17:47:34 -0800 Subject: [PATCH 3/5] Add player log prefix options --- .../Runtime/Prefabs/Console.prefab | 3 + .../Runtime/Udon Programs/UdonConsole.asset | 244 +++++++++++++----- .../Runtime/Udon Programs/UdonConsole.cs | 16 +- 3 files changed, 198 insertions(+), 65 deletions(-) diff --git a/Packages/com.varneon.vudon.logger/Runtime/Prefabs/Console.prefab b/Packages/com.varneon.vudon.logger/Runtime/Prefabs/Console.prefab index af75558..b276945 100644 --- a/Packages/com.varneon.vudon.logger/Runtime/Prefabs/Console.prefab +++ b/Packages/com.varneon.vudon.logger/Runtime/Prefabs/Console.prefab @@ -2846,6 +2846,9 @@ MonoBehaviour: maxLogEntriesStep: 50 fontSize: 24 proxyEntriesToLogs: 0 + systemPrefix: '[UdonConsole]:' + playerJoinPrefix: '[JOIN]:' + playerleavePrefix: '[LEAVE]:' logWindow: {fileID: 3718074137844359835} logItem: {fileID: 3718074138163775205} logToggle: {fileID: 3718074138598075316} diff --git a/Packages/com.varneon.vudon.logger/Runtime/Udon Programs/UdonConsole.asset b/Packages/com.varneon.vudon.logger/Runtime/Udon Programs/UdonConsole.asset index 61c8a1e..ad7d4c3 100644 --- a/Packages/com.varneon.vudon.logger/Runtime/Udon Programs/UdonConsole.asset +++ b/Packages/com.varneon.vudon.logger/Runtime/Udon Programs/UdonConsole.asset @@ -44,7 +44,7 @@ MonoBehaviour: Data: - Name: Entry: 12 - Data: 17 + Data: 19 - Name: Entry: 7 Data: @@ -567,16 +567,142 @@ MonoBehaviour: Data: - Name: $k Entry: 1 - Data: logWindow + Data: playerJoinPrefix - Name: $v Entry: 7 Data: 39|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor + - Name: k__BackingField + Entry: 1 + Data: playerJoinPrefix + - Name: k__BackingField + Entry: 9 + Data: 33 + - Name: k__BackingField + Entry: 9 + Data: 33 + - Name: k__BackingField + Entry: 7 + Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib + - Name: + Entry: 6 + Data: + - Name: + Entry: 8 + Data: + - Name: k__BackingField + Entry: 5 + Data: true + - Name: _fieldAttributes + Entry: 7 + Data: 40|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib + - Name: + Entry: 12 + Data: 2 + - Name: + Entry: 7 + Data: 41|UnityEngine.SerializeField, UnityEngine.CoreModule + - Name: + Entry: 8 + Data: + - Name: + Entry: 7 + Data: 42|Varneon.VInspector.FieldParentElementAttribute, Varneon.V-Inspector.Runtime + - Name: ParentName + Entry: 1 + Data: Foldout_Advanced + - Name: + Entry: 8 + Data: + - Name: + Entry: 13 + Data: + - Name: + Entry: 8 + Data: + - Name: + Entry: 8 + Data: + - Name: + Entry: 8 + Data: + - Name: + Entry: 7 + Data: + - Name: $k + Entry: 1 + Data: playerleavePrefix + - Name: $v + Entry: 7 + Data: 43|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor + - Name: k__BackingField + Entry: 1 + Data: playerleavePrefix + - Name: k__BackingField + Entry: 9 + Data: 33 + - Name: k__BackingField + Entry: 9 + Data: 33 + - Name: k__BackingField + Entry: 7 + Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib + - Name: + Entry: 6 + Data: + - Name: + Entry: 8 + Data: + - Name: k__BackingField + Entry: 5 + Data: true + - Name: _fieldAttributes + Entry: 7 + Data: 44|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib + - Name: + Entry: 12 + Data: 2 + - Name: + Entry: 7 + Data: 45|UnityEngine.SerializeField, UnityEngine.CoreModule + - Name: + Entry: 8 + Data: + - Name: + Entry: 7 + Data: 46|Varneon.VInspector.FieldParentElementAttribute, Varneon.V-Inspector.Runtime + - Name: ParentName + Entry: 1 + Data: Foldout_Advanced + - Name: + Entry: 8 + Data: + - Name: + Entry: 13 + Data: + - Name: + Entry: 8 + Data: + - Name: + Entry: 8 + Data: + - Name: + Entry: 8 + Data: + - Name: + Entry: 7 + Data: + - Name: $k + Entry: 1 + Data: logWindow + - Name: $v + Entry: 7 + Data: 47|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor - Name: k__BackingField Entry: 1 Data: logWindow - Name: k__BackingField Entry: 7 - Data: 40|System.RuntimeType, mscorlib + Data: 48|System.RuntimeType, mscorlib - Name: Entry: 1 Data: UnityEngine.RectTransform, UnityEngine.CoreModule @@ -585,7 +711,7 @@ MonoBehaviour: Data: - Name: k__BackingField Entry: 9 - Data: 40 + Data: 48 - Name: k__BackingField Entry: 7 Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib @@ -600,13 +726,13 @@ MonoBehaviour: Data: true - Name: _fieldAttributes Entry: 7 - Data: 41|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib + Data: 49|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib - Name: Entry: 12 Data: 4 - Name: Entry: 7 - Data: 42|UnityEngine.SpaceAttribute, UnityEngine.CoreModule + Data: 50|UnityEngine.SpaceAttribute, UnityEngine.CoreModule - Name: height Entry: 4 Data: 8 @@ -615,7 +741,7 @@ MonoBehaviour: Data: - Name: Entry: 7 - Data: 43|UnityEngine.HeaderAttribute, UnityEngine.CoreModule + Data: 51|UnityEngine.HeaderAttribute, UnityEngine.CoreModule - Name: header Entry: 1 Data: References @@ -624,13 +750,13 @@ MonoBehaviour: Data: - Name: Entry: 7 - Data: 44|UnityEngine.SerializeField, UnityEngine.CoreModule + Data: 52|UnityEngine.SerializeField, UnityEngine.CoreModule - Name: Entry: 8 Data: - Name: Entry: 7 - Data: 45|Varneon.VInspector.FieldParentElementAttribute, Varneon.V-Inspector.Runtime + Data: 53|Varneon.VInspector.FieldParentElementAttribute, Varneon.V-Inspector.Runtime - Name: ParentName Entry: 1 Data: Foldout_References @@ -657,13 +783,13 @@ MonoBehaviour: Data: logItem - Name: $v Entry: 7 - Data: 46|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor + Data: 54|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor - Name: k__BackingField Entry: 1 Data: logItem - Name: k__BackingField Entry: 7 - Data: 47|System.RuntimeType, mscorlib + Data: 55|System.RuntimeType, mscorlib - Name: Entry: 1 Data: UnityEngine.GameObject, UnityEngine.CoreModule @@ -672,7 +798,7 @@ MonoBehaviour: Data: - Name: k__BackingField Entry: 9 - Data: 47 + Data: 55 - Name: k__BackingField Entry: 7 Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib @@ -687,19 +813,19 @@ MonoBehaviour: Data: true - Name: _fieldAttributes Entry: 7 - Data: 48|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib + Data: 56|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib - Name: Entry: 12 Data: 2 - Name: Entry: 7 - Data: 49|UnityEngine.SerializeField, UnityEngine.CoreModule + Data: 57|UnityEngine.SerializeField, UnityEngine.CoreModule - Name: Entry: 8 Data: - Name: Entry: 7 - Data: 50|Varneon.VInspector.FieldParentElementAttribute, Varneon.V-Inspector.Runtime + Data: 58|Varneon.VInspector.FieldParentElementAttribute, Varneon.V-Inspector.Runtime - Name: ParentName Entry: 1 Data: Foldout_References @@ -726,13 +852,13 @@ MonoBehaviour: Data: logToggle - Name: $v Entry: 7 - Data: 51|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor + Data: 59|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor - Name: k__BackingField Entry: 1 Data: logToggle - Name: k__BackingField Entry: 7 - Data: 52|System.RuntimeType, mscorlib + Data: 60|System.RuntimeType, mscorlib - Name: Entry: 1 Data: UnityEngine.UI.Toggle, UnityEngine.UI @@ -741,7 +867,7 @@ MonoBehaviour: Data: - Name: k__BackingField Entry: 9 - Data: 52 + Data: 60 - Name: k__BackingField Entry: 7 Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib @@ -756,19 +882,19 @@ MonoBehaviour: Data: true - Name: _fieldAttributes Entry: 7 - Data: 53|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib + Data: 61|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib - Name: Entry: 12 Data: 2 - Name: Entry: 7 - Data: 54|UnityEngine.SerializeField, UnityEngine.CoreModule + Data: 62|UnityEngine.SerializeField, UnityEngine.CoreModule - Name: Entry: 8 Data: - Name: Entry: 7 - Data: 55|Varneon.VInspector.FieldParentElementAttribute, Varneon.V-Inspector.Runtime + Data: 63|Varneon.VInspector.FieldParentElementAttribute, Varneon.V-Inspector.Runtime - Name: ParentName Entry: 1 Data: Foldout_References @@ -795,16 +921,16 @@ MonoBehaviour: Data: warningToggle - Name: $v Entry: 7 - Data: 56|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor + Data: 64|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor - Name: k__BackingField Entry: 1 Data: warningToggle - Name: k__BackingField Entry: 9 - Data: 52 + Data: 60 - Name: k__BackingField Entry: 9 - Data: 52 + Data: 60 - Name: k__BackingField Entry: 7 Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib @@ -819,19 +945,19 @@ MonoBehaviour: Data: true - Name: _fieldAttributes Entry: 7 - Data: 57|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib + Data: 65|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib - Name: Entry: 12 Data: 2 - Name: Entry: 7 - Data: 58|UnityEngine.SerializeField, UnityEngine.CoreModule + Data: 66|UnityEngine.SerializeField, UnityEngine.CoreModule - Name: Entry: 8 Data: - Name: Entry: 7 - Data: 59|Varneon.VInspector.FieldParentElementAttribute, Varneon.V-Inspector.Runtime + Data: 67|Varneon.VInspector.FieldParentElementAttribute, Varneon.V-Inspector.Runtime - Name: ParentName Entry: 1 Data: Foldout_References @@ -858,16 +984,16 @@ MonoBehaviour: Data: errorToggle - Name: $v Entry: 7 - Data: 60|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor + Data: 68|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor - Name: k__BackingField Entry: 1 Data: errorToggle - Name: k__BackingField Entry: 9 - Data: 52 + Data: 60 - Name: k__BackingField Entry: 9 - Data: 52 + Data: 60 - Name: k__BackingField Entry: 7 Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib @@ -882,19 +1008,19 @@ MonoBehaviour: Data: true - Name: _fieldAttributes Entry: 7 - Data: 61|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib + Data: 69|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib - Name: Entry: 12 Data: 2 - Name: Entry: 7 - Data: 62|UnityEngine.SerializeField, UnityEngine.CoreModule + Data: 70|UnityEngine.SerializeField, UnityEngine.CoreModule - Name: Entry: 8 Data: - Name: Entry: 7 - Data: 63|Varneon.VInspector.FieldParentElementAttribute, Varneon.V-Inspector.Runtime + Data: 71|Varneon.VInspector.FieldParentElementAttribute, Varneon.V-Inspector.Runtime - Name: ParentName Entry: 1 Data: Foldout_References @@ -921,16 +1047,16 @@ MonoBehaviour: Data: timestampsToggle - Name: $v Entry: 7 - Data: 64|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor + Data: 72|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor - Name: k__BackingField Entry: 1 Data: timestampsToggle - Name: k__BackingField Entry: 9 - Data: 52 + Data: 60 - Name: k__BackingField Entry: 9 - Data: 52 + Data: 60 - Name: k__BackingField Entry: 7 Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib @@ -945,19 +1071,19 @@ MonoBehaviour: Data: true - Name: _fieldAttributes Entry: 7 - Data: 65|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib + Data: 73|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib - Name: Entry: 12 Data: 2 - Name: Entry: 7 - Data: 66|UnityEngine.SerializeField, UnityEngine.CoreModule + Data: 74|UnityEngine.SerializeField, UnityEngine.CoreModule - Name: Entry: 8 Data: - Name: Entry: 7 - Data: 67|Varneon.VInspector.FieldParentElementAttribute, Varneon.V-Inspector.Runtime + Data: 75|Varneon.VInspector.FieldParentElementAttribute, Varneon.V-Inspector.Runtime - Name: ParentName Entry: 1 Data: Foldout_References @@ -984,13 +1110,13 @@ MonoBehaviour: Data: maxLogEntriesField - Name: $v Entry: 7 - Data: 68|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor + Data: 76|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor - Name: k__BackingField Entry: 1 Data: maxLogEntriesField - Name: k__BackingField Entry: 7 - Data: 69|System.RuntimeType, mscorlib + Data: 77|System.RuntimeType, mscorlib - Name: Entry: 1 Data: UnityEngine.UI.InputField, UnityEngine.UI @@ -999,7 +1125,7 @@ MonoBehaviour: Data: - Name: k__BackingField Entry: 9 - Data: 69 + Data: 77 - Name: k__BackingField Entry: 7 Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib @@ -1014,19 +1140,19 @@ MonoBehaviour: Data: true - Name: _fieldAttributes Entry: 7 - Data: 70|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib + Data: 78|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib - Name: Entry: 12 Data: 2 - Name: Entry: 7 - Data: 71|UnityEngine.SerializeField, UnityEngine.CoreModule + Data: 79|UnityEngine.SerializeField, UnityEngine.CoreModule - Name: Entry: 8 Data: - Name: Entry: 7 - Data: 72|Varneon.VInspector.FieldParentElementAttribute, Varneon.V-Inspector.Runtime + Data: 80|Varneon.VInspector.FieldParentElementAttribute, Varneon.V-Inspector.Runtime - Name: ParentName Entry: 1 Data: Foldout_References @@ -1053,16 +1179,16 @@ MonoBehaviour: Data: fontSizeField - Name: $v Entry: 7 - Data: 73|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor + Data: 81|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor - Name: k__BackingField Entry: 1 Data: fontSizeField - Name: k__BackingField Entry: 9 - Data: 69 + Data: 77 - Name: k__BackingField Entry: 9 - Data: 69 + Data: 77 - Name: k__BackingField Entry: 7 Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib @@ -1077,19 +1203,19 @@ MonoBehaviour: Data: true - Name: _fieldAttributes Entry: 7 - Data: 74|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib + Data: 82|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib - Name: Entry: 12 Data: 2 - Name: Entry: 7 - Data: 75|UnityEngine.SerializeField, UnityEngine.CoreModule + Data: 83|UnityEngine.SerializeField, UnityEngine.CoreModule - Name: Entry: 8 Data: - Name: Entry: 7 - Data: 76|Varneon.VInspector.FieldParentElementAttribute, Varneon.V-Inspector.Runtime + Data: 84|Varneon.VInspector.FieldParentElementAttribute, Varneon.V-Inspector.Runtime - Name: ParentName Entry: 1 Data: Foldout_References @@ -1116,13 +1242,13 @@ MonoBehaviour: Data: scrollbar - Name: $v Entry: 7 - Data: 77|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor + Data: 85|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor - Name: k__BackingField Entry: 1 Data: scrollbar - Name: k__BackingField Entry: 7 - Data: 78|System.RuntimeType, mscorlib + Data: 86|System.RuntimeType, mscorlib - Name: Entry: 1 Data: UnityEngine.UI.Scrollbar, UnityEngine.UI @@ -1131,7 +1257,7 @@ MonoBehaviour: Data: - Name: k__BackingField Entry: 9 - Data: 78 + Data: 86 - Name: k__BackingField Entry: 7 Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib @@ -1146,7 +1272,7 @@ MonoBehaviour: Data: false - Name: _fieldAttributes Entry: 7 - Data: 79|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib + Data: 87|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib - Name: Entry: 12 Data: 0 @@ -1170,16 +1296,16 @@ MonoBehaviour: Data: canvasRoot - Name: $v Entry: 7 - Data: 80|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor + Data: 88|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor - Name: k__BackingField Entry: 1 Data: canvasRoot - Name: k__BackingField Entry: 9 - Data: 40 + Data: 48 - Name: k__BackingField Entry: 9 - Data: 40 + Data: 48 - Name: k__BackingField Entry: 7 Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib @@ -1194,7 +1320,7 @@ MonoBehaviour: Data: false - Name: _fieldAttributes Entry: 7 - Data: 81|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib + Data: 89|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib - Name: Entry: 12 Data: 0 diff --git a/Packages/com.varneon.vudon.logger/Runtime/Udon Programs/UdonConsole.cs b/Packages/com.varneon.vudon.logger/Runtime/Udon Programs/UdonConsole.cs index d4c7fb0..b7455e6 100644 --- a/Packages/com.varneon.vudon.logger/Runtime/Udon Programs/UdonConsole.cs +++ b/Packages/com.varneon.vudon.logger/Runtime/Udon Programs/UdonConsole.cs @@ -52,6 +52,14 @@ public class UdonConsole : UdonLogger [FieldParentElement("Foldout_Advanced")] private string systemPrefix = "[UdonConsole]:"; + [SerializeField] + [FieldParentElement("Foldout_Advanced")] + private string playerJoinPrefix = "[JOIN]:"; + + [SerializeField] + [FieldParentElement("Foldout_Advanced")] + private string playerleavePrefix = "[LEAVE]:"; + [Space] [Header("References")] [SerializeField] @@ -78,10 +86,6 @@ public class UdonConsole : UdonLogger #endregion #region Constants - private const string - JOIN_PREFIX = "[JOIN]", - LEAVE_PREFIX = "[LEAVE]"; - private const string WHITESPACE = " "; private const int @@ -294,14 +298,14 @@ public override void ClearLogs(LogType logType) #region Player Events public override void OnPlayerJoined(VRCPlayerApi player) { - Log(string.Join(WHITESPACE, new string[] { systemPrefix, JOIN_PREFIX, player.displayName })); + Log(string.Join(WHITESPACE, new string[] { systemPrefix, playerJoinPrefix, player.displayName })); } public override void OnPlayerLeft(VRCPlayerApi player) { if (!Utilities.IsValid(player)) { return; } - Log(string.Join(WHITESPACE, new string[] { systemPrefix, LEAVE_PREFIX, player.displayName })); + Log(string.Join(WHITESPACE, new string[] { systemPrefix, playerleavePrefix, player.displayName })); } #endregion From d1375fd80d581624114b6e77b2570f30ad8ca9d9 Mon Sep 17 00:00:00 2001 From: Varneon Date: Sun, 8 Jan 2023 17:49:37 -0800 Subject: [PATCH 4/5] Change default system prefix color --- .../Runtime/Udon Programs/UdonConsole.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Packages/com.varneon.vudon.logger/Runtime/Udon Programs/UdonConsole.cs b/Packages/com.varneon.vudon.logger/Runtime/Udon Programs/UdonConsole.cs index b7455e6..aff75ee 100644 --- a/Packages/com.varneon.vudon.logger/Runtime/Udon Programs/UdonConsole.cs +++ b/Packages/com.varneon.vudon.logger/Runtime/Udon Programs/UdonConsole.cs @@ -50,7 +50,7 @@ public class UdonConsole : UdonLogger [Header("Advanced")] [SerializeField] [FieldParentElement("Foldout_Advanced")] - private string systemPrefix = "[UdonConsole]:"; + private string systemPrefix = "[UdonConsole]:"; [SerializeField] [FieldParentElement("Foldout_Advanced")] From 1f30c1c7ce10e7626869efe4f086bcbcf19e5540 Mon Sep 17 00:00:00 2001 From: Varneon Date: Mon, 9 Jan 2023 04:01:37 -0800 Subject: [PATCH 5/5] Fix field name typo --- .../Runtime/Udon Programs/UdonConsole.asset | 4 ++-- .../Runtime/Udon Programs/UdonConsole.cs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Packages/com.varneon.vudon.logger/Runtime/Udon Programs/UdonConsole.asset b/Packages/com.varneon.vudon.logger/Runtime/Udon Programs/UdonConsole.asset index ad7d4c3..a9c7219 100644 --- a/Packages/com.varneon.vudon.logger/Runtime/Udon Programs/UdonConsole.asset +++ b/Packages/com.varneon.vudon.logger/Runtime/Udon Programs/UdonConsole.asset @@ -630,13 +630,13 @@ MonoBehaviour: Data: - Name: $k Entry: 1 - Data: playerleavePrefix + Data: playerLeavePrefix - Name: $v Entry: 7 Data: 43|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor - Name: k__BackingField Entry: 1 - Data: playerleavePrefix + Data: playerLeavePrefix - Name: k__BackingField Entry: 9 Data: 33 diff --git a/Packages/com.varneon.vudon.logger/Runtime/Udon Programs/UdonConsole.cs b/Packages/com.varneon.vudon.logger/Runtime/Udon Programs/UdonConsole.cs index aff75ee..c6f21ec 100644 --- a/Packages/com.varneon.vudon.logger/Runtime/Udon Programs/UdonConsole.cs +++ b/Packages/com.varneon.vudon.logger/Runtime/Udon Programs/UdonConsole.cs @@ -58,7 +58,7 @@ public class UdonConsole : UdonLogger [SerializeField] [FieldParentElement("Foldout_Advanced")] - private string playerleavePrefix = "[LEAVE]:"; + private string playerLeavePrefix = "[LEAVE]:"; [Space] [Header("References")] @@ -305,7 +305,7 @@ public override void OnPlayerLeft(VRCPlayerApi player) { if (!Utilities.IsValid(player)) { return; } - Log(string.Join(WHITESPACE, new string[] { systemPrefix, playerleavePrefix, player.displayName })); + Log(string.Join(WHITESPACE, new string[] { systemPrefix, playerLeavePrefix, player.displayName })); } #endregion