void OnEnable() { deviceConnectedAction = SteamVR_Events.DeviceConnectedAction(OnDeviceConnected); hideRenderModelsAction = SteamVR_Events.HideRenderModelsAction(OnHideRenderModels); modelSkinSettingsHaveChangedAction = SteamVR_Events.SystemAction(EVREventType.VREvent_ModelSkinSettingsHaveChanged, OnModelSkinSettingsHaveChanged); #if UNITY_EDITOR if (!Application.isPlaying) { return; } #endif if (!string.IsNullOrEmpty(modelOverride)) { Debug.Log("<b>[SteamVR_Standalone]</b> " + modelOverrideWarning); enabled = false; return; } var system = OpenVR.System; if (system != null && system.IsTrackedDeviceConnected((uint)index)) { UpdateModel(); } deviceConnectedAction.enabled = true; hideRenderModelsAction.enabled = true; modelSkinSettingsHaveChangedAction.enabled = true; }
SteamVR_RenderModel() { deviceConnectedAction = SteamVR_Events.DeviceConnectedAction(OnDeviceConnected); hideRenderModelsAction = SteamVR_Events.HideRenderModelsAction(OnHideRenderModels); modelSkinSettingsHaveChangedAction = SteamVR_Events.SystemAction(EVREventType.VREvent_ModelSkinSettingsHaveChanged, OnModelSkinSettingsHaveChanged); }
public static void SubscribeToNewPoses() { if (newPosesAction == null) { newPosesAction = SteamVR_Events.NewPosesAction(OnNewPoses); } newPosesAction.enabled = true; }
private void Awake() { newPosesAction = SteamVR_Events.NewPosesAction(OnNewPoses); OnEnable(); }
SteamVR_TrackedObject() { newPosesAction = SteamVR_Events.NewPosesAction(OnNewPoses); }