public static void InvalidateCaches() { #if UNITY_EDITOR Object.DestroyImmediate(systemSDK); Object.DestroyImmediate(headsetSDK); Object.DestroyImmediate(controllerSDK); Object.DestroyImmediate(boundariesSDK); Object.DestroyImmediate(trackerSDK); Object.DestroyImmediate(handSDK); #else Object.Destroy(systemSDK); Object.Destroy(headsetSDK); Object.Destroy(controllerSDK); Object.Destroy(boundariesSDK); Object.Destroy(trackerSDK); Object.Destroy(handSDK); #endif systemSDK = null; headsetSDK = null; controllerSDK = null; boundariesSDK = null; trackerSDK = null; handSDK = null; }
public static SDK_BaseTracker GetTrackerSDK() { if (VRTK_SDKManager.instance != null && VRTK_SDKManager.instance.loadedSetup != null) { return(VRTK_SDKManager.instance.loadedSetup.trackerSDK); } if (trackerSDK == null) { trackerSDK = ScriptableObject.CreateInstance <SDK_FallbackTracker>(); } return(trackerSDK); }