Skip to content

Commit 85b16b0

Browse files
authored
Merge pull request #814 from thestonefox/fix/controller-initialise
fix(SDK): run controller init code using Awake
2 parents 4bf52b0 + cbc397a commit 85b16b0

File tree

2 files changed

+1
-8
lines changed

2 files changed

+1
-8
lines changed

Assets/VRTK/SDK/OculusVR/SDK_OculusVRController.cs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -810,12 +810,6 @@ public override bool IsButtonTwoTouchedUpOnIndex(uint index)
810810
return IsButtonPressed(index, ButtonPressTypes.TouchUp, OVRInput.Touch.Two);
811811
}
812812

813-
[RuntimeInitializeOnLoadMethod]
814-
private void Initialise()
815-
{
816-
SetTrackedControllerCaches(true);
817-
}
818-
819813
private void SetTrackedControllerCaches(bool forceRefresh = false)
820814
{
821815
if (forceRefresh)

Assets/VRTK/SDK/SteamVR/SDK_SteamVRController.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -728,8 +728,7 @@ public override bool IsButtonTwoTouchedUpOnIndex(uint index)
728728
return false;
729729
}
730730

731-
[RuntimeInitializeOnLoadMethod]
732-
private void Initialise()
731+
private void Awake()
733732
{
734733
Assembly executingAssembly = Assembly.GetExecutingAssembly();
735734
Type eventClass = executingAssembly.GetType("SteamVR_Utils").GetNestedType("Event");

0 commit comments

Comments
 (0)