protected virtual void OnEnable() { if (!VRTK_SharedMethods.IsEditTime() && Application.isPlaying && defaultSnappedObject != null) { ForceSnap(defaultSnappedObject); } }
protected virtual void CreateHighlightersInEditor() { //Only run if it's in the editor if (VRTK_SharedMethods.IsEditTime()) { //Generate the main highlight object GenerateHighlightObject(); //If a joint is being used but no joint is found then throw a warning in the console if (snapType == SnapTypes.UseJoint && GetComponent <Joint>() == null) { VRTK_Logger.Warn(VRTK_Logger.GetCommonMessage(VRTK_Logger.CommonMessageKeys.REQUIRED_COMPONENT_MISSING_FROM_GAMEOBJECT, "SnapDropZone:" + name, "Joint", "the same", " because the `Snap Type` is set to `Use Joint`")); } //Generate the editor highlighter object with the custom material GenerateEditorHighlightObject(); //Ensure the game object references are force set based on whether they exist in the path ForceSetObjects(); //Show the editor highlight object if it's set. if (highlightEditorObject != null) { highlightEditorObject.SetActive(displayDropZoneInEditor); } } }
protected virtual void CreateHighlightersInEditor() { //Only run if it's in the editor if (VRTK_SharedMethods.IsEditTime()) { //Generate the main highlight object GenerateHighlightObject(); //If a joint is being used but no joint is found then throw a warning in the console if (snapType == SnapTypes.UseJoint && GetComponent <Joint>() == null) { Debug.LogWarning("A Joint Component is required on the SnapDropZone GameObject called [" + name + "] because the Snap Type is set to `Use Joint`."); } //Generate the editor highlighter object with the custom material GenerateEditorHighlightObject(); //Ensure the game object references are force set based on whether they exist in the path ForceSetObjects(); //Show the editor highlight object if it's set. if (highlightEditorObject) { highlightEditorObject.SetActive(displayDropZoneInEditor); } } }
private void Awake() { CreateInstance(); if (!VRTK_SharedMethods.IsEditTime()) { SetupControllers(); } }
private void Awake() { CreateInstance(); if (!VRTK_SharedMethods.IsEditTime()) { SetupControllers(); GetBoundariesSDK().InitBoundaries(); } }
protected virtual void Awake() { CreateInstance(); if (!VRTK_SharedMethods.IsEditTime()) { SetupHeadset(); SetupControllers(); GetBoundariesSDK().InitBoundaries(); } }
// Token: 0x06001B6A RID: 7018 RVA: 0x0008F540 File Offset: 0x0008D740 private static void HandleSDKGetter <BaseType>(string prettyName, VRTK_SDKInfo info, IEnumerable <VRTK_SDKInfo> installedInfos) where BaseType : SDK_Base { if (VRTK_SharedMethods.IsEditTime()) { return; } string sdkerrorDescription = VRTK_SDKSetup.GetSDKErrorDescription <BaseType>(prettyName, info, installedInfos); if (!string.IsNullOrEmpty(sdkerrorDescription)) { VRTK_Logger.Error(sdkerrorDescription); } }
// Token: 0x06001225 RID: 4645 RVA: 0x00068AEC File Offset: 0x00066CEC protected virtual void ChooseDestroyType(Component deleteComponent) { if (VRTK_SharedMethods.IsEditTime()) { if (deleteComponent != null) { Object.DestroyImmediate(deleteComponent); return; } } else if (deleteComponent != null) { Object.Destroy(deleteComponent); } }
private void CreateInstance() { if (instance == null) { instance = this; } else if (instance != this) { Destroy(gameObject); } if (persistOnLoad && !VRTK_SharedMethods.IsEditTime()) { DontDestroyOnLoad(gameObject); } }
protected virtual void ChooseDestroyType(GameObject deleteObject) { if (VRTK_SharedMethods.IsEditTime()) { if (deleteObject != null) { DestroyImmediate(deleteObject); } } else { if (deleteObject != null) { Destroy(deleteObject); } } }
protected virtual void ChooseDestroyType(Component deleteComponent) { if (VRTK_SharedMethods.IsEditTime()) { if (deleteComponent) { DestroyImmediate(deleteComponent); } } else { if (deleteComponent) { Destroy(deleteComponent); } } }
private void ChooseDestroyType(GameObject deleteObject) { if (VRTK_SharedMethods.IsEditTime()) { if (deleteObject) { DestroyImmediate(deleteObject); } } else { if (deleteObject) { Destroy(deleteObject); } } }
protected virtual void CreateHighlightersInEditor() { if (VRTK_SharedMethods.IsEditTime()) { GenerateHighlightObject(); if (snapType == SnapTypes.UseJoint && GetComponent <Joint>() == null) { VRTK_Logger.Warn(VRTK_Logger.GetCommonMessage(VRTK_Logger.CommonMessageKeys.REQUIRED_COMPONENT_MISSING_FROM_GAMEOBJECT, "SnapDropZone:" + name, "Joint", "the same", " because the `Snap Type` is set to `Use Joint`")); } GenerateEditorHighlightObject(); ForceSetObjects(); if (highlightEditorObject != null) { highlightEditorObject.SetActive(displayDropZoneInEditor); } } }
private void CreateInstance() { if (_instance == null) { _instance = this; string sdkErrorDescriptions = string.Join("\n- ", GetSimplifiedSDKErrorDescriptions()); if (!string.IsNullOrEmpty(sdkErrorDescriptions)) { sdkErrorDescriptions = "- " + sdkErrorDescriptions; Debug.LogError("There are some errors because of the current SDK Manager setup:\n" + sdkErrorDescriptions); } if (persistOnLoad && !VRTK_SharedMethods.IsEditTime()) { DontDestroyOnLoad(gameObject); } } else if (_instance != this) { Destroy(gameObject); } }
protected virtual void OnEnable() { currentValidSnapInteractableObjects.Clear(); currentSnappedObject = null; objectToClone = null; clonedObjectColliderStates = new bool[0]; willSnap = false; isSnapped = false; wasSnapped = false; isHighlighted = false; #pragma warning disable 618 if (defaultSnappedObject != null && defaultSnappedInteractableObject == null) { defaultSnappedInteractableObject = defaultSnappedObject.GetComponentInParent <VRTK_InteractableObject>(); } #pragma warning restore 618 DisableHighlightShadows(); if (!VRTK_SharedMethods.IsEditTime() && Application.isPlaying && defaultSnappedInteractableObject != null) { ForceSnap(defaultSnappedInteractableObject); } }
private void CreateInstance() { if (_instance == null) { _instance = this; VRTK_SDK_Bridge.InvalidateCaches(); string sdkErrorDescriptions = string.Join("\n- ", GetSimplifiedSDKErrorDescriptions()); if (!string.IsNullOrEmpty(sdkErrorDescriptions)) { sdkErrorDescriptions = "- " + sdkErrorDescriptions; VRTK_Logger.Error(VRTK_Logger.GetCommonMessage(VRTK_Logger.CommonMessageKeys.SDK_MANAGER_ERRORS, new string[] { sdkErrorDescriptions })); } if (persistOnLoad && !VRTK_SharedMethods.IsEditTime()) { DontDestroyOnLoad(gameObject); } } else if (_instance != this) { Destroy(gameObject); } }