From 46c39396a21591bda2425c2cb15f38be0ff8b93a Mon Sep 17 00:00:00 2001 From: Harvey Ball Date: Thu, 22 Jun 2017 16:41:39 +0100 Subject: [PATCH] fix(SDK): ensure object references are populated on enable There was an issue where the SDK Setup object references were not being auto populated on scene change which was causing certain scripts to not be parented correctly. This fix ensures the references are populated when the SDK Setup script is enabled. --- Assets/VRTK/Scripts/Utilities/SDK/VRTK_SDKSetup.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Assets/VRTK/Scripts/Utilities/SDK/VRTK_SDKSetup.cs b/Assets/VRTK/Scripts/Utilities/SDK/VRTK_SDKSetup.cs index 94bfc3223..9a793d905 100644 --- a/Assets/VRTK/Scripts/Utilities/SDK/VRTK_SDKSetup.cs +++ b/Assets/VRTK/Scripts/Utilities/SDK/VRTK_SDKSetup.cs @@ -395,6 +395,11 @@ public void OnUnloaded(VRTK_SDKManager sender) } } + private void OnEnable() + { + PopulateObjectReferences(false); + } + #if UNITY_EDITOR static VRTK_SDKSetup() {