-
-
Notifications
You must be signed in to change notification settings - Fork 998
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(Utilities): prevent sdk change event unregistering on disable
A number of scripts that utilise the `LoadedSetupChanged` event on the SDKManager were set up so that if they were on a GameObject that was a child of the current SDK camera rig then when the SDK was changed, the camera rig would become disabled and the script listening to the setup change event would then also have the `OnDisable` method called and unregister the listener. This would mean that the script would no longer be listening for the switch in SDK and any functionality required on SDK switch would no longer be available. For instance, the SDK Object Alias script would not re-child the relevant object because the SDK change would not be observed as the listener had been unregistered. This is fixed by checking in the `OnDisable` method of the script to see if the actual GameObject the script is on is disabled and to only unregister the event if it is, therefore ignoring any parent GameObject enabled state.
- Loading branch information
1 parent
230f0ec
commit ee141c0
Showing
3 changed files
with
28 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters