Skip to content

Commit 2fc0d4a

Browse files
author
Bianca Marina Stana
committed
Refactored some code in AccessibilityManager.OnEnable
1 parent 02ad1ca commit 2fc0d4a

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

Assets/Scripts/Screen Reader/AccessibilityManager.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -197,10 +197,7 @@ void OnEnable()
197197

198198
// Generate the accessibility hierarchy for the current scene and set it to AssistiveSupport.activeHierarchy
199199
// so that the screen reader can use it.
200-
var lastLoadedScene = GetLastLoadedScene();
201-
202-
GenerateHierarchy(lastLoadedScene);
203-
AssistiveSupport.activeHierarchy = hierarchy;
200+
RebuildHierarchy();
204201
}
205202

206203
void OnDisable()

0 commit comments

Comments
 (0)