protected virtual void InitPlayAreaCursor() { if (playArea == null) { Debug.LogError("No play area could be found. Have you selected a valid Boundaries SDK in the SDK Manager? If you are unsure, then click the GameObject with the `VRTK_SDKManager` script attached to it in Edit Mode and select a Boundaries SDK from the dropdown."); return; } Vector3[] cursorDrawVertices = VRTK_SDK_Bridge.GetPlayAreaVertices(playArea.gameObject); if (validLocationObject != null) { GeneratePlayAreaCursorFromPrefab(cursorDrawVertices); } else { GeneratePlayAreaCursor(cursorDrawVertices); } if (playAreaCursor != null) { playAreaCursor.SetActive(false); VRTK_PlayerObject.SetPlayerObject(playAreaCursor, VRTK_PlayerObject.ObjectTypes.Pointer); CreateCursorCollider(playAreaCursor); playAreaCursor.AddComponent <Rigidbody>().isKinematic = true; VRTK_PlayAreaCollider playAreaCursorScript = playAreaCursor.AddComponent <VRTK_PlayAreaCollider>(); playAreaCursorScript.SetParent(this); playAreaCursorScript.SetIgnoreTarget(targetListPolicy); playAreaCursor.layer = LayerMask.NameToLayer("Ignore Raycast"); } }
protected virtual void InitPlayAreaCursor() { if (playArea == null) { VRTK_Logger.Error(VRTK_Logger.GetCommonMessage(VRTK_Logger.CommonMessageKeys.SDK_OBJECT_NOT_FOUND, "PlayArea", "Boundaries SDK")); return; } Vector3[] cursorDrawVertices = VRTK_SDK_Bridge.GetPlayAreaVertices(playArea.gameObject); if (validLocationObject != null) { GeneratePlayAreaCursorFromPrefab(cursorDrawVertices); } else { GeneratePlayAreaCursor(cursorDrawVertices); } if (playAreaCursor != null) { playAreaCursor.SetActive(false); VRTK_PlayerObject.SetPlayerObject(playAreaCursor, VRTK_PlayerObject.ObjectTypes.Pointer); CreateCursorCollider(playAreaCursor); playAreaCursor.AddComponent <Rigidbody>().isKinematic = true; VRTK_PlayAreaCollider playAreaCursorScript = playAreaCursor.AddComponent <VRTK_PlayAreaCollider>(); playAreaCursorScript.SetParent(this); playAreaCursorScript.SetIgnoreTarget(targetListPolicy); playAreaCursor.layer = LayerMask.NameToLayer("Ignore Raycast"); } }
// Token: 0x06001934 RID: 6452 RVA: 0x0008629C File Offset: 0x0008449C protected virtual void InitPlayAreaCursor() { if (this.playArea == null) { VRTK_Logger.Error(VRTK_Logger.GetCommonMessage(VRTK_Logger.CommonMessageKeys.SDK_OBJECT_NOT_FOUND, new object[] { "PlayArea", "Boundaries SDK" })); return; } Vector3[] array = VRTK_SDK_Bridge.GetPlayAreaVertices(); if (this.validLocationObject != null) { this.GeneratePlayAreaCursorFromPrefab(array); } else { if (array == null || array.Length < 8) { array = new Vector3[] { new Vector3(0.8f, 0f, -0.8f), new Vector3(-0.8f, 0f, -0.8f), new Vector3(-0.8f, 0f, 0.8f), new Vector3(0.8f, 0f, 0.8f), new Vector3(1f, 0f, -1f), new Vector3(-1f, 0f, -1f), new Vector3(-1f, 0f, 1f), new Vector3(1f, 0f, 1f) }; } this.GeneratePlayAreaCursor(array); } if (this.playAreaCursor != null) { this.playAreaCursor.SetActive(false); VRTK_PlayerObject.SetPlayerObject(this.playAreaCursor, VRTK_PlayerObject.ObjectTypes.Pointer); this.CreateCursorCollider(this.playAreaCursor); this.playAreaCursor.AddComponent <Rigidbody>().isKinematic = true; VRTK_PlayAreaCollider vrtk_PlayAreaCollider = this.playAreaCursor.AddComponent <VRTK_PlayAreaCollider>(); vrtk_PlayAreaCollider.SetParent(this); vrtk_PlayAreaCollider.SetIgnoreTarget(this.targetListPolicy); this.playAreaCursor.layer = LayerMask.NameToLayer("Ignore Raycast"); } }