File tree Expand file tree Collapse file tree 1 file changed +21
-4
lines changed
Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/AppBar Expand file tree Collapse file tree 1 file changed +21
-4
lines changed Original file line number Diff line number Diff line change @@ -256,8 +256,16 @@ private void InitializeButtons()
256256 throw new Exception ( "Found a transform without an AppBarButton component under buttonTransforms!" ) ;
257257
258258 appBarButton . InitializeButtonContent ( this ) ;
259- // Set to invisible initially
260- appBarButton . SetVisible ( false ) ;
259+ // Set to invisible initially if not custom
260+ switch ( appBarButton . ButtonType )
261+ {
262+ case ButtonTypeEnum . Custom :
263+ break ;
264+
265+ default :
266+ appBarButton . SetVisible ( false ) ;
267+ break ;
268+ }
261269
262270 buttons . Add ( appBarButton ) ;
263271 }
@@ -278,11 +286,20 @@ private void UpdateButtons()
278286 {
279287 AppBarButton button = buttons [ i ] ;
280288
281- if ( button . ButtonType != ButtonTypeEnum . Custom )
282- button . SetVisible ( GetButtonVisible ( button . ButtonType ) ) ;
289+ switch ( button . ButtonType )
290+ {
291+ case ButtonTypeEnum . Custom :
292+ break ;
293+
294+ default :
295+ button . SetVisible ( GetButtonVisible ( button . ButtonType ) ) ;
296+ break ;
297+ }
283298
284299 if ( ! buttons [ i ] . Visible )
300+ {
285301 continue ;
302+ }
286303
287304 activeButtonNum ++ ;
288305 }
You can’t perform that action at this time.
0 commit comments