File tree Expand file tree Collapse file tree 3 files changed +19
-5
lines changed Expand file tree Collapse file tree 3 files changed +19
-5
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
15
15
### Fixed
16
16
- Workaround VRCSDK bug where stale PhysBones state could be retained over play mode transitions (#231 )
17
17
- Show object name when we're unable to find the actual GameObject, in error display UI (#224 )
18
+ - Rerender error report window when leaving play mode (#237 )
19
+ - Deduplicate object references in NDMF console error reports (#237 )
18
20
19
21
### Changed
20
22
- Renamed ` NDMF Error Report ` to ` NDMF Console ` (#222 )
Original file line number Diff line number Diff line change 1
1
#region
2
2
3
- using System ;
4
3
using System . Collections . Generic ;
5
4
using System . Linq ;
6
5
using nadena . dev . ndmf . localization ;
7
6
using nadena . dev . ndmf . runtime ;
8
7
using UnityEditor ;
9
8
using UnityEditor . UIElements ;
10
9
using UnityEngine ;
11
- using UnityEngine . SceneManagement ;
12
10
using UnityEngine . UIElements ;
13
- using Object = UnityEngine . Object ;
14
11
15
12
#endregion
16
13
17
14
namespace nadena . dev . ndmf . ui
18
15
{
19
16
#region
20
17
21
- using UnityObject = Object ;
22
-
23
18
#endregion
24
19
25
20
// Note: Due to historical reason, "NDMF Console" is internally called "Error Report".
@@ -147,11 +142,23 @@ private void OnEnable()
147
142
// GUI setup done
148
143
EditorApplication . hierarchyChanged += SetupSelector ;
149
144
}
145
+
146
+ EditorApplication . playModeStateChanged += OnPlayModeStateChanged ;
150
147
}
151
148
152
149
private void OnDisable ( )
153
150
{
154
151
EditorApplication . hierarchyChanged -= SetupSelector ;
152
+ EditorApplication . playModeStateChanged -= OnPlayModeStateChanged ;
153
+ }
154
+
155
+ private void OnPlayModeStateChanged ( PlayModeStateChange state )
156
+ {
157
+ if ( _testBuild != null && state == PlayModeStateChange . EnteredEditMode )
158
+ {
159
+ // Rerender error UI in case we can now find objects that had moved during processing...
160
+ UpdateContents ( ) ;
161
+ }
155
162
}
156
163
157
164
private void OnSelectionChange ( )
Original file line number Diff line number Diff line change 1
1
#region
2
2
3
+ using System . Collections . Generic ;
3
4
using nadena . dev . ndmf . localization ;
4
5
using UnityEditor ;
5
6
using UnityEngine . UIElements ;
@@ -88,8 +89,12 @@ private void RenderContent()
88
89
}
89
90
else
90
91
{
92
+ HashSet < ObjectReference > _refs = new HashSet < ObjectReference > ( ) ;
91
93
foreach ( var objRef in _error . References )
92
94
{
95
+ // dedup refs
96
+ if ( ! _refs . Add ( objRef ) ) continue ;
97
+
93
98
if ( ObjectSelector . TryCreate ( _report , objRef , out var selector ) )
94
99
{
95
100
objRefs . Add ( selector ) ;
You can’t perform that action at this time.
0 commit comments