@@ -20,6 +20,19 @@ public class UiPresenterManagerWindow : EditorWindow
2020 private double _lastRefreshTime ;
2121 private const double RefreshInterval = 0.5 ; // seconds
2222
23+ private const string StatsExplanation =
24+ "Stats Summary\n \n " +
25+ "• Total: Number of presenter instances currently loaded in memory.\n " +
26+ "• Opened: Presenters that are currently visible (tracked by UiService.VisiblePresenters).\n " +
27+ "• Closed: Presenters loaded in memory but hidden (ready to reopen without reloading)." ;
28+
29+ private const string PresenterExplanation =
30+ "Presenter List\n \n " +
31+ "• Presenter Type: The class name of the UiPresenter component, click to ping the presenter GameObject in the scene.\n " +
32+ "• Status: Green dot = visible, Red dot = loaded but hidden.\n " +
33+ "• Actions: OPEN/CLOSE toggles visibility; Unload removes from memory.\n " +
34+ "• Instance: Multi-instance address ('(default)' for singleton presenters)." ;
35+
2336 private ScrollView _scrollView ;
2437 private Label _statsLabel ;
2538
@@ -58,6 +71,11 @@ private void CreateGUI()
5871 var header = CreateHeader ( ) ;
5972 root . Add ( header ) ;
6073
74+ // Stats explanation
75+ var statsHelpBox = new HelpBox ( StatsExplanation , HelpBoxMessageType . Info ) ;
76+ statsHelpBox . style . marginBottom = 5 ;
77+ root . Add ( statsHelpBox ) ;
78+
6179 // Stats bar
6280 _statsLabel = new Label ( ) ;
6381 _statsLabel . style . paddingLeft = 10 ;
@@ -66,8 +84,14 @@ private void CreateGUI()
6684 _statsLabel . style . backgroundColor = new Color ( 0.15f , 0.15f , 0.15f ) ;
6785 _statsLabel . style . unityFontStyleAndWeight = FontStyle . Bold ;
6886 _statsLabel . enableRichText = true ;
87+ _statsLabel . tooltip = "Total: loaded in memory | Opened: visible | Closed: hidden but loaded" ;
6988 root . Add ( _statsLabel ) ;
7089
90+ // Presenter list explanation
91+ var presenterHelpBox = new HelpBox ( PresenterExplanation , HelpBoxMessageType . Info ) ;
92+ presenterHelpBox . style . marginBottom = 5 ;
93+ root . Add ( presenterHelpBox ) ;
94+
7195 // Column Headers
7296 var columnHeaders = CreateColumnHeaders ( ) ;
7397 root . Add ( columnHeaders ) ;
@@ -165,6 +189,14 @@ private Label CreateHeaderLabel(string text, int columnIndex)
165189 ApplyColumnStyle ( label , columnIndex ) ;
166190 label . style . unityFontStyleAndWeight = FontStyle . Bold ;
167191 label . style . paddingLeft = 10 ;
192+ label . tooltip = columnIndex switch
193+ {
194+ 0 => "The UiPresenter component class name" ,
195+ 1 => "Green = visible, Red = hidden" ,
196+ 2 => "Open/Close toggles visibility; Unload removes from memory" ,
197+ 3 => "Instance address for multi-instance presenters" ,
198+ _ => ""
199+ } ;
168200 return label ;
169201 }
170202
@@ -231,11 +263,20 @@ private VisualElement CreatePresenterRow(GameLovers.UiService.UiService service,
231263 row . style . backgroundColor = new Color ( 1 , 1 , 1 , 0.03f ) ;
232264 }
233265
234- // Type (column 0)
235- var typeLabel = new Label ( instance . Type . Name ) ;
236- ApplyColumnStyle ( typeLabel , 0 ) ;
237- typeLabel . style . paddingLeft = 10 ;
238- row . Add ( typeLabel ) ;
266+ // Type button (column 0) - clickable to select in hierarchy
267+ var typeButton = new Button ( ( ) =>
268+ {
269+ Selection . activeGameObject = instance . Presenter . gameObject ;
270+ EditorGUIUtility . PingObject ( instance . Presenter . gameObject ) ;
271+ if ( SceneView . lastActiveSceneView != null )
272+ {
273+ SceneView . lastActiveSceneView . FrameSelected ( ) ;
274+ }
275+ } ) { text = instance . Type . Name } ;
276+ ApplyColumnStyle ( typeButton , 0 ) ;
277+ typeButton . style . marginLeft = 5 ;
278+ typeButton . style . marginRight = 5 ;
279+ row . Add ( typeButton ) ;
239280
240281 // Status (column 1)
241282 var statusContainer = new VisualElement ( ) ;
0 commit comments