/// <summary> /// Initializes the handle for the action /// </summary> public virtual void Initialize(bool createNew = false, bool throwErrors = true) { if (createNew) { setData.Initialize(); } else { setData = SteamVR_Input.GetActionSetDataFromPath(actionSetPath); if (setData == null) { #if UNITY_EDITOR if (throwErrors) { if (string.IsNullOrEmpty(actionSetPath)) { Debug.LogError("<b>[SteamVR]</b> Action has not been assigned."); } else { Debug.LogError("<b>[SteamVR]</b> Could not find action with path: " + actionSetPath); } } #endif } } initialized = true; }
public void PreInitialize(string newActionPath) { actionSetPath = newActionPath; setData = new SteamVR_ActionSet_Data(); setData.fullPath = actionSetPath; setData.PreInitialize(); initialized = true; }
/// <summary> /// Initializes the handle for the action /// </summary> public virtual void Initialize(bool createNew = false, bool throwErrors = true) { if (createNew) { setData.Initialize(); } else { setData = SteamVR_Input.GetActionSetDataFromPath(actionSetPath); } initialized = true; }
void ISerializationCallbackReceiver.OnAfterDeserialize() { if (setData != null) { if (setData.fullPath != actionSetPath) { setData = SteamVR_Input.GetActionSetDataFromPath(actionSetPath); } } if (initialized == false) { Initialize(false, false); } }