김유현

VR 매핑 및 걷는 부분 추가

Showing 1000 changed files with 2189 additions and 0 deletions

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

This diff is collapsed. Click to expand it.
1 +using System.Collections;
2 +using System.Collections.Generic;
3 +using UnityEngine;
4 +using Valve.VR;
5 +
6 +public class ActionTest : MonoBehaviour
7 +{
8 +
9 + public SteamVR_Input_Sources handType; // 모두 사용, 왼손, 오른손
10 + public SteamVR_Action_Boolean teleportAction; // 텔레포트 액션
11 + public SteamVR_Action_Boolean grabAction; // 그랩 액션
12 +
13 +
14 + void Update()
15 + {
16 + if (GetTeleportDown())
17 + {
18 + Debug.Log("Teleport" + handType);
19 + }
20 + if (GetGrab())
21 + {
22 + Debug.Log("Grab" + handType);
23 + }
24 + }
25 +
26 + // 텔레포트가 활성화되면 true 반환
27 + public bool GetTeleportDown()
28 + {
29 + return teleportAction.GetStateDown(handType);
30 + }
31 +
32 + // 잡기 액션이 활성화되어 있으면 true 반환
33 + public bool GetGrab()
34 + {
35 + return grabAction.GetState(handType);
36 + }
37 +}
38 +
1 +fileFormatVersion: 2
2 +guid: bc0ffd84c6247fa49b8db0e93d7ed3cc
3 +MonoImporter:
4 + externalObjects: {}
5 + serializedVersion: 2
6 + defaultReferences: []
7 + executionOrder: 0
8 + icon: {instanceID: 0}
9 + userData:
10 + assetBundleName:
11 + assetBundleVariant:
1 +using System.Collections;
2 +using System.Collections.Generic;
3 +using UnityEngine;
4 +using Valve.VR;
5 +
6 +public class ControllerGrabObject : MonoBehaviour
7 +{
8 +
9 + public SteamVR_Input_Sources handType; // 모두 사용, 왼손, 오른손
10 + public SteamVR_Behaviour_Pose controllerPose; // 텔레포트 액션
11 + public SteamVR_Action_Boolean grabAction; // 그랩 액션
12 +
13 + private GameObject collidingObject; // 현재 충돌중인 객체
14 + private GameObject objectInHand; // 플레이어가 잡은 객체
15 +
16 + void Update()
17 + {
18 +
19 + // 잡는 버튼을 누를 때
20 + if (grabAction.GetLastStateDown(handType))
21 + {
22 + if (collidingObject)
23 + {
24 + GrabObject();
25 + }
26 + }
27 + // 잡는 버튼을 땔 때
28 + if (grabAction.GetLastStateUp(handType))
29 + {
30 + if (objectInHand)
31 + {
32 + ReleaseObject();
33 + }
34 + }
35 + }
36 +
37 + // 충돌이 시작되는 순간
38 + public void OnTriggerEnter(Collider other)
39 + {
40 + SetCollidingObject(other);
41 + }
42 + // 충돌중일 때
43 + public void OnTriggerStay(Collider other)
44 + {
45 + SetCollidingObject(other);
46 + }
47 + // 충돌이 끝나는 순간
48 + public void OnTriggerExit(Collider other)
49 + {
50 + if (!collidingObject)
51 + {
52 + return;
53 + }
54 + collidingObject = null;
55 + }
56 + // 충돌중인 객체로 설정
57 + private void SetCollidingObject(Collider col)
58 + {
59 +
60 + if (collidingObject || !col.GetComponent<Rigidbody>())
61 + {
62 + return;
63 + }
64 +
65 + collidingObject = col.gameObject;
66 + }
67 +
68 + // 객체를 잡음
69 + private void GrabObject()
70 + {
71 +
72 + objectInHand = collidingObject; // 잡은 객체로 설정
73 + collidingObject = null; // 충돌 객체 해제
74 +
75 + var joint = AddFixedJoint();
76 + joint.connectedBody = objectInHand.GetComponent<Rigidbody>();
77 + }
78 +
79 + // FixedJoint => 객체들을 하나로 묶어 고정시켜줌
80 + // breakForce => 조인트가 제거되도록 하기 위한 필요한 힘의 크기
81 + // breakTorque => 조인트가 제거되도록 하기 위한 필요한 토크
82 + private FixedJoint AddFixedJoint()
83 + {
84 +
85 + FixedJoint fx = gameObject.AddComponent<FixedJoint>();
86 + fx.breakForce = 20000;
87 + fx.breakTorque = 20000;
88 + return fx;
89 + }
90 +
91 + // 객체를 놓음
92 + // contrllerPose.GetVeloecity() => 컨트롤러의 속도
93 + // controllerPose.GetAngularVelocity() => 컨트롤러의 각속도
94 + private void ReleaseObject()
95 + {
96 +
97 + if (GetComponent<FixedJoint>())
98 + {
99 +
100 + GetComponent<FixedJoint>().connectedBody = null;
101 + Destroy(GetComponent<FixedJoint>());
102 +
103 + objectInHand.GetComponent<Rigidbody>().velocity =
104 + controllerPose.GetVelocity();
105 + objectInHand.GetComponent<Rigidbody>().angularVelocity =
106 + controllerPose.GetAngularVelocity();
107 + }
108 + objectInHand = null;
109 + }
110 +}
1 +fileFormatVersion: 2
2 +guid: b741eff1bc82afe4ba5f37912f3ac273
3 +MonoImporter:
4 + externalObjects: {}
5 + serializedVersion: 2
6 + defaultReferences: []
7 + executionOrder: 0
8 + icon: {instanceID: 0}
9 + userData:
10 + assetBundleName:
11 + assetBundleVariant:
1 +using System.Collections;
2 +using System.Collections.Generic;
3 +using UnityEngine;
4 +
5 +public class MoveCtrl : MonoBehaviour {
6 +
7 + public enum MoveType
8 + {
9 + WAY_POINT,
10 + LOOK_AT,
11 + DAYDREAM
12 + }
13 +
14 + public MoveType moveType = MoveType.WAY_POINT; // 이동 방식
15 + public float speed = 1.0f; // 이동 속도
16 + public float damping = 3.0f; // 회전 속도를 조절할 계수
17 +
18 + private Transform tr;
19 + private Transform camTr;
20 + private CharacterController cc;
21 + private Transform[] points; // 웨이포인트를 저장할 배열
22 + private int nextIdx = 1; // 다음에 이동해야 할 위치 변수
23 +
24 + public static bool isStopped = false;
25 +
26 + void Start()
27 + {
28 + tr = GetComponent<Transform>();
29 + camTr = Camera.main.GetComponent<Transform>();
30 + cc = GetComponent<CharacterController>();
31 + points = GameObject.Find("WayPointGroup").GetComponentsInChildren<Transform>();
32 + }
33 +
34 + void Update()
35 + {
36 + if (isStopped)
37 + return;
38 +
39 + switch(moveType)
40 + {
41 + case MoveType.WAY_POINT:
42 + MoveWayPoint();
43 + break;
44 +
45 + case MoveType.LOOK_AT:
46 + MoveLookAt();
47 + break;
48 +
49 + case MoveType.DAYDREAM:
50 + break;
51 + }
52 + }
53 +
54 + void MoveWayPoint()
55 + {
56 + // 현재 위치에서 다음 웨이포인트를 바로보는 벡터를 계산
57 + Debug.Log(nextIdx.ToString());
58 + Vector3 direction = points[nextIdx].position - tr.position;
59 + // 산출된 벡터의 회전 각도를 쿼터니언 타입으로 산출
60 + Quaternion rot = Quaternion.LookRotation(direction);
61 + // 현재 각도에서 회전해야 할 각도까지 부드럽게 회전 처리
62 + tr.rotation = Quaternion.Slerp(tr.rotation, rot, Time.deltaTime * damping);
63 +
64 + // 전진 방향으로 이동 처리
65 + tr.Translate(Vector3.forward * Time.deltaTime * speed);
66 + }
67 +
68 + void MoveLookAt()
69 + {
70 + // 메인카메라가 바라보는 방향
71 + Vector3 dir = camTr.TransformDirection(Vector3.forward);
72 + // dir 벡터의 방향으로 초당 speed만큼씩 이동
73 + cc.SimpleMove(dir * speed);
74 + }
75 +
76 + void OnTriggerEnter(Collider coll)
77 + {
78 + // 웨이포인트(Point 게임오브젝트)에 충돌 여부 판단
79 + if(coll.CompareTag("WAY_POINT"))
80 + {
81 + // 맨 마지막 웨이포인트에 도달했을 때 처음 인덱스로 변경
82 + if (++nextIdx >= points.Length){
83 +
84 + }
85 +
86 +
87 + }
88 + }
89 +}
1 +fileFormatVersion: 2
2 +guid: 914ccbf7ab746444d96d0472df020033
3 +MonoImporter:
4 + externalObjects: {}
5 + serializedVersion: 2
6 + defaultReferences: []
7 + executionOrder: 0
8 + icon: {instanceID: 0}
9 + userData:
10 + assetBundleName:
11 + assetBundleVariant:
1 +using System.Collections;
2 +using System.Collections.Generic;
3 +using UnityEngine;
4 +
5 +public class WayPointTrack : MonoBehaviour {
6 +
7 + public Color lineColor = Color.yellow;
8 + private Transform[] points;
9 +
10 + void OnDrawGizmos()
11 + {
12 + // 라인의 색상 지정
13 + Gizmos.color = lineColor;
14 + // WayPointGroup 게임 오브젝트 아래에 있는 모든 Point 게임오브젝트 추출
15 + points = GetComponentsInChildren<Transform>();
16 +
17 + int nextIdx = 1;
18 +
19 + Vector3 currPos = points[nextIdx].position;
20 + Vector3 nextPos;
21 +
22 + // Point 게임오브젝트를 순회하면서 라인을 그림
23 + for(int i = 0; i <= points.Length; i++)
24 + {
25 + // 마지막 Point일 경우 첫 번째 Point로 지정
26 + nextPos = (++nextIdx >= points.Length) ? points[1].position :
27 + points[nextIdx].position;
28 + // 시작 위치에서 종료 위치까지 라인을 그림
29 + Gizmos.DrawLine(currPos, nextPos);
30 +
31 + currPos = nextPos;
32 + }
33 + }
34 +}
1 +fileFormatVersion: 2
2 +guid: da9edd014b0d5a440bc374981a31600b
3 +MonoImporter:
4 + externalObjects: {}
5 + serializedVersion: 2
6 + defaultReferences: []
7 + executionOrder: 0
8 + icon: {instanceID: 0}
9 + userData:
10 + assetBundleName:
11 + assetBundleVariant:
1 +fileFormatVersion: 2
2 +guid: 69ad61543c9e8bf42a40ad46b3abaf05
3 +folderAsset: yes
4 +DefaultImporter:
5 + externalObjects: {}
6 + userData:
7 + assetBundleName:
8 + assetBundleVariant:
1 +fileFormatVersion: 2
2 +guid: c33af0785775d7548b22541da37936fe
3 +folderAsset: yes
4 +DefaultImporter:
5 + userData:
6 + assetBundleName:
1 +fileFormatVersion: 2
2 +guid: b894f6f57c99a1c46957650bc11d7824
3 +MonoImporter:
4 + externalObjects: {}
5 + serializedVersion: 2
6 + defaultReferences: []
7 + executionOrder: 0
8 + icon: {instanceID: 0}
9 + userData:
10 + assetBundleName:
11 + assetBundleVariant:
1 +fileFormatVersion: 2
2 +guid: 524ac57f667bffd459f44076a7111efb
3 +MonoImporter:
4 + externalObjects: {}
5 + serializedVersion: 2
6 + defaultReferences: []
7 + executionOrder: 0
8 + icon: {instanceID: 0}
9 + userData:
10 + assetBundleName:
11 + assetBundleVariant:
1 +//======= Copyright (c) Valve Corporation, All rights reserved. ===============
2 +//
3 +// Purpose: Prompt developers to use settings most compatible with SteamVR.
4 +//
5 +//=============================================================================
6 +
7 +#if (UNITY_5_4_OR_NEWER && !UNITY_2018_1_OR_NEWER)
8 +
9 +using UnityEngine;
10 +using UnityEditor;
11 +using System.IO;
12 +using System.Collections.Generic;
13 +using System.Linq;
14 +using System;
15 +using System.Reflection;
16 +
17 +using UnityEditor.Callbacks;
18 +
19 +namespace Valve.VR
20 +{
21 + public class SteamVR_AutoEnableVR_54to2018
22 + {
23 + [DidReloadScripts]
24 + private static void OnReload()
25 + {
26 + EditorApplication.update += Update;
27 + }
28 +
29 + protected const string openVRString = "OpenVR";
30 +
31 + private static void End()
32 + {
33 + EditorApplication.update -= Update;
34 + }
35 +
36 +
37 + public static void Update()
38 + {
39 + if (!SteamVR_Settings.instance.autoEnableVR || Application.isPlaying)
40 + End();
41 +
42 + bool enabledVR = false;
43 +
44 + int shouldInstall = -1;
45 + if (UnityEditor.PlayerSettings.virtualRealitySupported == false)
46 + {
47 + shouldInstall = UnityEditor.EditorUtility.DisplayDialogComplex("SteamVR", "Would you like to enable Virtual Reality mode?\n\nThis will enable Virtual Reality in Player Settings and add OpenVR as a target.", "Yes", "No, and don't ask again", "No");
48 +
49 + switch (shouldInstall)
50 + {
51 + case 0: //yes
52 + UnityEditor.PlayerSettings.virtualRealitySupported = true;
53 + break;
54 + case 1: //no:
55 + UnityEditor.EditorApplication.update -= Update;
56 + return;
57 + case 2: //no, don't ask
58 + SteamVR_Settings.instance.autoEnableVR = false;
59 + SteamVR_Settings.Save();
60 + UnityEditor.EditorApplication.update -= Update;
61 + return;
62 + }
63 + }
64 +
65 + UnityEditor.BuildTargetGroup currentTarget = UnityEditor.EditorUserBuildSettings.selectedBuildTargetGroup;
66 +
67 +#if UNITY_5_6_OR_NEWER
68 + string[] devices = UnityEditorInternal.VR.VREditor.GetVREnabledDevicesOnTargetGroup(currentTarget);
69 +#else
70 + string[] devices = UnityEditorInternal.VR.VREditor.GetVREnabledDevices(currentTarget);
71 +#endif
72 +
73 + bool hasOpenVR = devices.Any(device => string.Equals(device, openVRString, System.StringComparison.CurrentCultureIgnoreCase));
74 +
75 + if (hasOpenVR == false || enabledVR)
76 + {
77 + string[] newDevices;
78 + if (enabledVR && hasOpenVR == false)
79 + {
80 + newDevices = new string[] { openVRString }; //only list openvr if we enabled it
81 + }
82 + else
83 + {
84 + List<string> devicesList = new List<string>(devices); //list openvr as the first option if it wasn't in the list.
85 + if (hasOpenVR)
86 + devicesList.Remove(openVRString);
87 +
88 + devicesList.Insert(0, openVRString);
89 + newDevices = devicesList.ToArray();
90 + }
91 +
92 + int shouldEnable = -1;
93 + if (shouldInstall == 0)
94 + shouldEnable = 0;
95 + else
96 + shouldEnable = UnityEditor.EditorUtility.DisplayDialogComplex("SteamVR", "Would you like to enable OpenVR as a VR target?", "Yes", "No, and don't ask again", "No");
97 +
98 + switch (shouldEnable)
99 + {
100 + case 0: //yes
101 +#if UNITY_5_6_OR_NEWER
102 + UnityEditorInternal.VR.VREditor.SetVREnabledDevicesOnTargetGroup(currentTarget, newDevices);
103 +#else
104 + UnityEditorInternal.VR.VREditor.SetVREnabledDevices(currentTarget, newDevices);
105 +#endif
106 + Debug.Log("<b>[SteamVR Setup]</b> Added OpenVR to supported VR SDKs list.");
107 + break;
108 + case 1: //no:
109 + break;
110 + case 2: //no, don't ask
111 + SteamVR_Settings.instance.autoEnableVR = false;
112 + SteamVR_Settings.Save();
113 + break;
114 + }
115 +
116 + }
117 +
118 + UnityEditor.EditorApplication.update -= Update;
119 +
120 + }
121 + }
122 +}
123 +#endif
...\ No newline at end of file ...\ No newline at end of file
1 +fileFormatVersion: 2
2 +guid: f3c98d5dbcd01ee4ba302d8f71a8d55a
3 +MonoImporter:
4 + externalObjects: {}
5 + serializedVersion: 2
6 + defaultReferences: []
7 + executionOrder: 0
8 + icon: {instanceID: 0}
9 + userData:
10 + assetBundleName:
11 + assetBundleVariant:
1 +{
2 + "name": "SteamVR_Editor",
3 + "references": [
4 + "SteamVR",
5 + "Unity.XR.OpenVR",
6 + "Unity.XR.Management.Editor",
7 + "Unity.XR.Management"
8 + ],
9 + "includePlatforms": [
10 + "Editor"
11 + ],
12 + "excludePlatforms": [],
13 + "allowUnsafeCode": false,
14 + "overrideReferences": false,
15 + "precompiledReferences": [],
16 + "autoReferenced": true,
17 + "defineConstraints": [],
18 + "versionDefines": [
19 + {
20 + "name": "com.valvesoftware.unity.openvr",
21 + "expression": "",
22 + "define": "OPENVR_XR_API"
23 + },
24 + {
25 + "name": "com.unity.xr.management",
26 + "expression": "3.2.0",
27 + "define": "XR_MGMT_GTE_320"
28 + },
29 + {
30 + "name": "com.unity.xr.management",
31 + "expression": "",
32 + "define": "XR_MGMT"
33 + }
34 + ],
35 + "noEngineReferences": false
36 +}
...\ No newline at end of file ...\ No newline at end of file
1 +fileFormatVersion: 2
2 +guid: 9bac448de04a4f6448fee1acc220e5a1
3 +AssemblyDefinitionImporter:
4 + externalObjects: {}
5 + userData:
6 + assetBundleName:
7 + assetBundleVariant:
1 +//======= Copyright (c) Valve Corporation, All rights reserved. ===============
2 +//
3 +// Purpose: Custom inspector display for SteamVR_Camera
4 +//
5 +//=============================================================================
6 +
7 +using UnityEngine;
8 +using UnityEditor;
9 +using System.IO;
10 +using Valve.VR;
11 +
12 +[CustomEditor(typeof(SteamVR_Camera)), CanEditMultipleObjects]
13 +public class SteamVR_Editor : Editor
14 +{
15 + int bannerHeight = 150;
16 + Texture logo;
17 +
18 + SerializedProperty script, wireframe;
19 +
20 + string GetResourcePath()
21 + {
22 + var ms = MonoScript.FromScriptableObject(this);
23 + var path = AssetDatabase.GetAssetPath(ms);
24 + path = Path.GetDirectoryName(path);
25 + return path.Substring(0, path.Length - "Editor".Length) + "Textures/";
26 + }
27 +
28 + void OnEnable()
29 + {
30 + var resourcePath = GetResourcePath();
31 +
32 + logo = AssetDatabase.LoadAssetAtPath<Texture2D>(resourcePath + "logo.png");
33 +
34 + script = serializedObject.FindProperty("m_Script");
35 +
36 + wireframe = serializedObject.FindProperty("wireframe");
37 +
38 + foreach (SteamVR_Camera target in targets)
39 + target.ForceLast();
40 + }
41 +
42 + public override void OnInspectorGUI()
43 + {
44 + serializedObject.Update();
45 +
46 + var rect = GUILayoutUtility.GetRect(Screen.width - 38, bannerHeight, GUI.skin.box);
47 + if (logo)
48 + GUI.DrawTexture(rect, logo, ScaleMode.ScaleToFit);
49 +
50 + if (!Application.isPlaying)
51 + {
52 + var expand = false;
53 + var collapse = false;
54 + foreach (SteamVR_Camera target in targets)
55 + {
56 + if (AssetDatabase.Contains(target))
57 + continue;
58 + if (target.isExpanded)
59 + collapse = true;
60 + else
61 + expand = true;
62 + }
63 +
64 + if (expand)
65 + {
66 + GUILayout.BeginHorizontal();
67 + if (GUILayout.Button("Expand"))
68 + {
69 + foreach (SteamVR_Camera target in targets)
70 + {
71 + if (AssetDatabase.Contains(target))
72 + continue;
73 + if (!target.isExpanded)
74 + {
75 + target.Expand();
76 + EditorUtility.SetDirty(target);
77 + }
78 + }
79 + }
80 + GUILayout.Space(18);
81 + GUILayout.EndHorizontal();
82 + }
83 +
84 + if (collapse)
85 + {
86 + GUILayout.BeginHorizontal();
87 + if (GUILayout.Button("Collapse"))
88 + {
89 + foreach (SteamVR_Camera target in targets)
90 + {
91 + if (AssetDatabase.Contains(target))
92 + continue;
93 + if (target.isExpanded)
94 + {
95 + target.Collapse();
96 + EditorUtility.SetDirty(target);
97 + }
98 + }
99 + }
100 + GUILayout.Space(18);
101 + GUILayout.EndHorizontal();
102 + }
103 + }
104 +
105 + EditorGUILayout.PropertyField(script);
106 + EditorGUILayout.PropertyField(wireframe);
107 +
108 + serializedObject.ApplyModifiedProperties();
109 + }
110 +
111 + public static void ExportPackage()
112 + {
113 + AssetDatabase.ExportPackage(new string[] {
114 + "Assets/SteamVR",
115 + "Assets/Plugins/openvr_api.cs",
116 + "Assets/Plugins/openvr_api.bundle",
117 + "Assets/Plugins/x86/openvr_api.dll",
118 + "Assets/Plugins/x86/steam_api.dll",
119 + "Assets/Plugins/x86/libsteam_api.so",
120 + "Assets/Plugins/x86_64/openvr_api.dll",
121 + "Assets/Plugins/x86_64/steam_api.dll",
122 + "Assets/Plugins/x86_64/libsteam_api.so",
123 + "Assets/Plugins/x86_64/libopenvr_api.so",
124 + }, "steamvr.unitypackage", ExportPackageOptions.Recurse);
125 + EditorApplication.Exit(0);
126 + }
127 +}
...\ No newline at end of file ...\ No newline at end of file
1 +fileFormatVersion: 2
2 +guid: 5ba22c80948c94e44a82b9fd1b3abd0d
3 +MonoImporter:
4 + serializedVersion: 2
5 + defaultReferences: []
6 + executionOrder: 0
7 + icon: {instanceID: 0}
8 + userData:
9 + assetBundleName:
1 +//======= Copyright (c) Valve Corporation, All rights reserved. ===============
2 +//removed and added to the SteamVR_Settings asset so it can be configured per project
...\ No newline at end of file ...\ No newline at end of file
1 +fileFormatVersion: 2
2 +guid: 29abf75f7265ccb45b799eac4ab0ca94
3 +timeCreated: 1487968203
4 +licenseType: Store
5 +MonoImporter:
6 + serializedVersion: 2
7 + defaultReferences: []
8 + executionOrder: 0
9 + icon: {instanceID: 0}
10 + userData:
11 + assetBundleName:
12 + assetBundleVariant:
1 +//======= Copyright (c) Valve Corporation, All rights reserved. ===============
2 +//
3 +// Purpose: Custom inspector display for SteamVR_RenderModel
4 +//
5 +//=============================================================================
6 +
7 +using UnityEngine;
8 +using UnityEditor;
9 +using System.Text;
10 +using System.Collections.Generic;
11 +
12 +namespace Valve.VR
13 +{
14 + [CustomEditor(typeof(SteamVR_RenderModel)), CanEditMultipleObjects]
15 + public class SteamVR_RenderModelEditor : Editor
16 + {
17 + SerializedProperty script, index, modelOverride, shader, verbose, createComponents, updateDynamically;
18 +
19 + static string[] renderModelNames;
20 + int renderModelIndex;
21 +
22 + void OnEnable()
23 + {
24 + script = serializedObject.FindProperty("m_Script");
25 + index = serializedObject.FindProperty("index");
26 + modelOverride = serializedObject.FindProperty("modelOverride");
27 + shader = serializedObject.FindProperty("shader");
28 + verbose = serializedObject.FindProperty("verbose");
29 + createComponents = serializedObject.FindProperty("createComponents");
30 + updateDynamically = serializedObject.FindProperty("updateDynamically");
31 +
32 + // Load render model names if necessary.
33 + if (renderModelNames == null)
34 + {
35 + renderModelNames = LoadRenderModelNames();
36 + }
37 +
38 + // Update renderModelIndex based on current modelOverride value.
39 + if (modelOverride.stringValue != "")
40 + {
41 + for (int i = 0; i < renderModelNames.Length; i++)
42 + {
43 + if (modelOverride.stringValue == renderModelNames[i])
44 + {
45 + renderModelIndex = i;
46 + break;
47 + }
48 + }
49 + }
50 + }
51 +
52 + static string[] LoadRenderModelNames()
53 + {
54 + var results = new List<string>();
55 + results.Add("None");
56 +
57 + using (var holder = new SteamVR_RenderModel.RenderModelInterfaceHolder())
58 + {
59 + var renderModels = holder.instance;
60 + if (renderModels != null)
61 + {
62 + uint count = renderModels.GetRenderModelCount();
63 + for (uint i = 0; i < count; i++)
64 + {
65 + var buffer = new StringBuilder();
66 + var requiredSize = renderModels.GetRenderModelName(i, buffer, 0);
67 + if (requiredSize == 0)
68 + continue;
69 +
70 + buffer.EnsureCapacity((int)requiredSize);
71 + renderModels.GetRenderModelName(i, buffer, requiredSize);
72 + results.Add(buffer.ToString());
73 + }
74 + }
75 + }
76 +
77 + return results.ToArray();
78 + }
79 +
80 + public override void OnInspectorGUI()
81 + {
82 + serializedObject.Update();
83 +
84 + EditorGUILayout.PropertyField(script);
85 + EditorGUILayout.PropertyField(index);
86 + //EditorGUILayout.PropertyField(modelOverride);
87 +
88 + GUILayout.BeginHorizontal();
89 + GUILayout.Label(new GUIContent("Model Override", SteamVR_RenderModel.modelOverrideWarning));
90 + var selected = EditorGUILayout.Popup(renderModelIndex, renderModelNames);
91 + if (selected != renderModelIndex)
92 + {
93 + renderModelIndex = selected;
94 + modelOverride.stringValue = (selected > 0) ? renderModelNames[selected] : "";
95 + }
96 + GUILayout.EndHorizontal();
97 +
98 + EditorGUILayout.PropertyField(shader);
99 + EditorGUILayout.PropertyField(verbose);
100 + EditorGUILayout.PropertyField(createComponents);
101 + EditorGUILayout.PropertyField(updateDynamically);
102 +
103 + serializedObject.ApplyModifiedProperties();
104 + }
105 + }
106 +}
...\ No newline at end of file ...\ No newline at end of file
1 +fileFormatVersion: 2
2 +guid: 67867a20919f7db45a2e7034fda1c28e
3 +timeCreated: 1433373945
4 +licenseType: Store
5 +MonoImporter:
6 + serializedVersion: 2
7 + defaultReferences: []
8 + executionOrder: 0
9 + icon: {instanceID: 0}
10 + userData:
11 + assetBundleName:
12 + assetBundleVariant:
1 +fileFormatVersion: 2
2 +guid: 80087fbbf7bf93a46bb4aea276b19568
3 +timeCreated: 1446765449
4 +licenseType: Store
5 +MonoImporter:
6 + serializedVersion: 2
7 + defaultReferences: []
8 + executionOrder: 0
9 + icon: {instanceID: 0}
10 + userData:
11 + assetBundleName:
12 + assetBundleVariant:
1 +fileFormatVersion: 2
2 +guid: d2244eee8a3a4784fb40d1123ff69301
3 +timeCreated: 1438809573
4 +licenseType: Store
5 +MonoImporter:
6 + serializedVersion: 2
7 + defaultReferences: []
8 + executionOrder: 0
9 + icon: {instanceID: 0}
10 + userData:
11 + assetBundleName:
12 + assetBundleVariant:
1 +//======= Copyright (c) Valve Corporation, All rights reserved. ===============
2 +//
3 +// Purpose: Notify developers when a new version of the plugin is available.
4 +//
5 +//=============================================================================
6 +
7 +using UnityEngine;
8 +using UnityEditor;
9 +using System.IO;
10 +using System.Text.RegularExpressions;
11 +
12 +#if UNITY_2018_3_OR_NEWER
13 +#pragma warning disable CS0618
14 +#endif
15 +
16 +namespace Valve.VR
17 +{
18 + [InitializeOnLoad]
19 + public class SteamVR_Update : EditorWindow
20 + {
21 + const string currentVersion = "2.1";
22 + const string versionUrl = "http://media.steampowered.com/apps/steamvr/unitypluginversion.txt";
23 + const string notesUrl = "http://media.steampowered.com/apps/steamvr/unityplugin-v{0}.txt";
24 + const string pluginUrl = "http://u3d.as/content/valve-corporation/steam-vr-plugin";
25 + const string doNotShowKey = "SteamVR.DoNotShow.v{0}";
26 +
27 + static bool gotVersion = false;
28 + static WWW wwwVersion, wwwNotes;
29 + static string version, notes;
30 + static SteamVR_Update window;
31 +
32 + static SteamVR_Update()
33 + {
34 + EditorApplication.update += Update;
35 + }
36 +
37 + static void Update()
38 + {
39 + if (!gotVersion)
40 + {
41 + if (wwwVersion == null)
42 + wwwVersion = new WWW(versionUrl);
43 +
44 + if (!wwwVersion.isDone)
45 + return;
46 +
47 + if (UrlSuccess(wwwVersion))
48 + version = wwwVersion.text;
49 +
50 + wwwVersion = null;
51 + gotVersion = true;
52 +
53 + if (ShouldDisplay())
54 + {
55 + var url = string.Format(notesUrl, version);
56 + wwwNotes = new WWW(url);
57 +
58 + window = GetWindow<SteamVR_Update>(true);
59 + window.minSize = new Vector2(320, 440);
60 + //window.title = "SteamVR";
61 + }
62 + }
63 +
64 + if (wwwNotes != null)
65 + {
66 + if (!wwwNotes.isDone)
67 + return;
68 +
69 + if (UrlSuccess(wwwNotes))
70 + notes = wwwNotes.text;
71 +
72 + wwwNotes = null;
73 +
74 + if (notes != "")
75 + window.Repaint();
76 + }
77 +
78 + EditorApplication.update -= Update;
79 + }
80 +
81 + static bool UrlSuccess(WWW www)
82 + {
83 + if (!string.IsNullOrEmpty(www.error))
84 + return false;
85 + if (Regex.IsMatch(www.text, "404 not found", RegexOptions.IgnoreCase))
86 + return false;
87 + return true;
88 + }
89 +
90 + static bool ShouldDisplay()
91 + {
92 + if (string.IsNullOrEmpty(version))
93 + return false;
94 + if (version == currentVersion)
95 + return false;
96 + if (EditorPrefs.HasKey(string.Format(doNotShowKey, version)))
97 + return false;
98 +
99 + // parse to see if newer (e.g. 1.0.4 vs 1.0.3)
100 + var versionSplit = version.Split('.');
101 + var currentVersionSplit = currentVersion.Split('.');
102 + for (int i = 0; i < versionSplit.Length && i < currentVersionSplit.Length; i++)
103 + {
104 + int versionValue, currentVersionValue;
105 + if (int.TryParse(versionSplit[i], out versionValue) &&
106 + int.TryParse(currentVersionSplit[i], out currentVersionValue))
107 + {
108 + if (versionValue > currentVersionValue)
109 + return true;
110 + if (versionValue < currentVersionValue)
111 + return false;
112 + }
113 + }
114 +
115 + // same up to this point, now differentiate based on number of sub values (e.g. 1.0.4.1 vs 1.0.4)
116 + if (versionSplit.Length <= currentVersionSplit.Length)
117 + return false;
118 +
119 + return true;
120 + }
121 +
122 + Vector2 scrollPosition;
123 + bool toggleState;
124 +
125 + string GetResourcePath()
126 + {
127 + var ms = MonoScript.FromScriptableObject(this);
128 + var path = AssetDatabase.GetAssetPath(ms);
129 + path = Path.GetDirectoryName(path);
130 + return path.Substring(0, path.Length - "Editor".Length) + "Textures/";
131 + }
132 +
133 + public void OnGUI()
134 + {
135 + EditorGUILayout.HelpBox("A new version of the SteamVR plugin is available!", MessageType.Warning);
136 +
137 + var resourcePath = GetResourcePath();
138 + var logo = AssetDatabase.LoadAssetAtPath<Texture2D>(resourcePath + "logo.png");
139 + var rect = GUILayoutUtility.GetRect(position.width, 150, GUI.skin.box);
140 + if (logo)
141 + GUI.DrawTexture(rect, logo, ScaleMode.ScaleToFit);
142 +
143 + scrollPosition = GUILayout.BeginScrollView(scrollPosition);
144 +
145 + GUILayout.Label("Current version: " + currentVersion);
146 + GUILayout.Label("New version: " + version);
147 +
148 + if (notes != "")
149 + {
150 + GUILayout.Label("Release notes:");
151 + EditorGUILayout.HelpBox(notes, MessageType.Info);
152 + }
153 +
154 + GUILayout.EndScrollView();
155 +
156 + GUILayout.FlexibleSpace();
157 +
158 + if (GUILayout.Button("Get Latest Version"))
159 + {
160 + Application.OpenURL(pluginUrl);
161 + }
162 +
163 + EditorGUI.BeginChangeCheck();
164 + var doNotShow = GUILayout.Toggle(toggleState, "Do not prompt for this version again.");
165 + if (EditorGUI.EndChangeCheck())
166 + {
167 + toggleState = doNotShow;
168 + var key = string.Format(doNotShowKey, version);
169 + if (doNotShow)
170 + EditorPrefs.SetBool(key, true);
171 + else
172 + EditorPrefs.DeleteKey(key);
173 + }
174 + }
175 + }
176 +}
177 +
178 +#if UNITY_2018_3_OR_NEWER
179 +#pragma warning restore CS0618
180 +#endif
...\ No newline at end of file ...\ No newline at end of file
1 +fileFormatVersion: 2
2 +guid: 73a0556bda803bf4e898751dcfcf21a8
3 +timeCreated: 1433880062
4 +licenseType: Store
5 +MonoImporter:
6 + serializedVersion: 2
7 + defaultReferences: []
8 + executionOrder: 0
9 + icon: {instanceID: 0}
10 + userData:
11 + assetBundleName:
12 + assetBundleVariant:
1 +using UnityEditor;
2 +using UnityEngine;
3 +
4 +using System.CodeDom;
5 +using Microsoft.CSharp;
6 +using System.IO;
7 +using System.CodeDom.Compiler;
8 +
9 +using System.Linq;
10 +using System.Collections.Generic;
11 +using System.Reflection;
12 +using System.Linq.Expressions;
13 +using System;
14 +
15 +
16 +namespace Valve.VR
17 +{
18 + [CustomPropertyDrawer(typeof(SteamVR_UpdateModes))]
19 + public class SteamVR_UpdateModesEditor : PropertyDrawer
20 + {
21 + public override void OnGUI(Rect _position, SerializedProperty _property, GUIContent _label)
22 + {
23 + _property.intValue = EditorGUI.MaskField(_position, _label, _property.intValue, _property.enumNames);
24 + }
25 + }
26 +}
...\ No newline at end of file ...\ No newline at end of file
1 +fileFormatVersion: 2
2 +guid: 656e3d05f0a289d4ab6f3d44f65c9b6d
3 +timeCreated: 1521584981
4 +licenseType: Store
5 +MonoImporter:
6 + serializedVersion: 2
7 + defaultReferences: []
8 + executionOrder: 0
9 + icon: {instanceID: 0}
10 + userData:
11 + assetBundleName:
12 + assetBundleVariant:
1 +fileFormatVersion: 2
2 +guid: 61f4796ee4f00314e8d8b1ad39a78c28
3 +folderAsset: yes
4 +timeCreated: 1438797390
5 +licenseType: Store
6 +DefaultImporter:
7 + userData:
8 + assetBundleName:
9 + assetBundleVariant:
1 +using UnityEngine;
2 +using System.Collections;
3 +
4 +namespace Valve.VR
5 +{
6 + public class SteamVR_CameraHelper : MonoBehaviour
7 + {
8 + void Start()
9 + {
10 +#if OPENVR_XR_API && UNITY_LEGACY_INPUT_HELPERS
11 + if (this.gameObject.GetComponent<UnityEngine.SpatialTracking.TrackedPoseDriver>() == null)
12 + {
13 + this.gameObject.AddComponent<UnityEngine.SpatialTracking.TrackedPoseDriver>();
14 + }
15 +#endif
16 + }
17 + }
18 +}
...\ No newline at end of file ...\ No newline at end of file
1 +fileFormatVersion: 2
2 +guid: c30a2316e98e1dc4b97e432a1301f85c
3 +timeCreated: 1591403558
4 +licenseType: Store
5 +MonoImporter:
6 + serializedVersion: 2
7 + defaultReferences: []
8 + executionOrder: 0
9 + icon: {instanceID: 0}
10 + userData:
11 + assetBundleName:
12 + assetBundleVariant:
1 +using UnityEngine;
2 +using System.Collections;
3 +
4 +namespace Valve.VR.Extras
5 +{
6 + /// <summary>
7 + /// This is an example class of how to force steamvr initialization. You still need to have vr mode enabled
8 + /// but you can have the top sdk set to None, then this script will force it to OpenVR after a second
9 + /// </summary>
10 + public class SteamVR_ForceSteamVRMode : MonoBehaviour
11 + {
12 + public GameObject vrCameraPrefab;
13 +
14 + public GameObject[] disableObjectsOnLoad;
15 +
16 + private IEnumerator Start()
17 + {
18 + yield return new WaitForSeconds(1f); // just here to show that you can wait a while.
19 +
20 + SteamVR.Initialize(true);
21 +
22 + while (SteamVR.initializedState != SteamVR.InitializedStates.InitializeSuccess)
23 + yield return null;
24 +
25 + for (int disableIndex = 0; disableIndex < disableObjectsOnLoad.Length; disableIndex++)
26 + {
27 + GameObject toDisable = disableObjectsOnLoad[disableIndex];
28 + if (toDisable != null)
29 + toDisable.SetActive(false);
30 + }
31 +
32 + GameObject.Instantiate(vrCameraPrefab);
33 + }
34 + }
35 +}
...\ No newline at end of file ...\ No newline at end of file
1 +fileFormatVersion: 2
2 +guid: c4bc5db9c652ff8408b7cda0197f87f1
3 +timeCreated: 1539107854
4 +licenseType: Store
5 +MonoImporter:
6 + serializedVersion: 2
7 + defaultReferences: []
8 + executionOrder: 0
9 + icon: {instanceID: 0}
10 + userData:
11 + assetBundleName:
12 + assetBundleVariant:
1 +fileFormatVersion: 2
2 +guid: 9b1775e13a163e146930422a18e54bfc
3 +timeCreated: 1539107812
4 +licenseType: Store
5 +DefaultImporter:
6 + userData:
7 + assetBundleName:
8 + assetBundleVariant:
1 +//======= Copyright (c) Valve Corporation, All rights reserved. ===============
2 +using UnityEngine;
3 +using System.Collections;
4 +
5 +namespace Valve.VR.Extras
6 +{
7 + public class SteamVR_GazeTracker : MonoBehaviour
8 + {
9 + public bool isInGaze = false;
10 + public event GazeEventHandler GazeOn;
11 + public event GazeEventHandler GazeOff;
12 + public float gazeInCutoff = 0.15f;
13 + public float gazeOutCutoff = 0.4f;
14 +
15 + // Contains a HMD tracked object that we can use to find the user's gaze
16 + protected Transform hmdTrackedObject = null;
17 +
18 + public virtual void OnGazeOn(GazeEventArgs gazeEventArgs)
19 + {
20 + if (GazeOn != null)
21 + GazeOn(this, gazeEventArgs);
22 + }
23 +
24 + public virtual void OnGazeOff(GazeEventArgs gazeEventArgs)
25 + {
26 + if (GazeOff != null)
27 + GazeOff(this, gazeEventArgs);
28 + }
29 +
30 + protected virtual void Update()
31 + {
32 + // If we haven't set up hmdTrackedObject find what the user is looking at
33 + if (hmdTrackedObject == null)
34 + {
35 + SteamVR_TrackedObject[] trackedObjects = FindObjectsOfType<SteamVR_TrackedObject>();
36 + foreach (SteamVR_TrackedObject tracked in trackedObjects)
37 + {
38 + if (tracked.index == SteamVR_TrackedObject.EIndex.Hmd)
39 + {
40 + hmdTrackedObject = tracked.transform;
41 + break;
42 + }
43 + }
44 + }
45 +
46 + if (hmdTrackedObject)
47 + {
48 + Ray ray = new Ray(hmdTrackedObject.position, hmdTrackedObject.forward);
49 + Plane plane = new Plane(hmdTrackedObject.forward, transform.position);
50 +
51 + float enter = 0.0f;
52 + if (plane.Raycast(ray, out enter))
53 + {
54 + Vector3 intersect = hmdTrackedObject.position + hmdTrackedObject.forward * enter;
55 + float dist = Vector3.Distance(intersect, transform.position);
56 + //Debug.Log("Gaze dist = " + dist);
57 + if (dist < gazeInCutoff && !isInGaze)
58 + {
59 + isInGaze = true;
60 + GazeEventArgs gazeEventArgs;
61 + gazeEventArgs.distance = dist;
62 + OnGazeOn(gazeEventArgs);
63 + }
64 + else if (dist >= gazeOutCutoff && isInGaze)
65 + {
66 + isInGaze = false;
67 + GazeEventArgs gazeEventArgs;
68 + gazeEventArgs.distance = dist;
69 + OnGazeOff(gazeEventArgs);
70 + }
71 + }
72 +
73 + }
74 +
75 + }
76 + }
77 + public struct GazeEventArgs
78 + {
79 + public float distance;
80 + }
81 +
82 + public delegate void GazeEventHandler(object sender, GazeEventArgs gazeEventArgs);
83 +}
...\ No newline at end of file ...\ No newline at end of file
1 +fileFormatVersion: 2
2 +guid: 501eb8b744f73714fbe7dbdd5e3ef66e
3 +timeCreated: 1426193800
4 +licenseType: Store
5 +MonoImporter:
6 + serializedVersion: 2
7 + defaultReferences: []
8 + executionOrder: 0
9 + icon: {instanceID: 0}
10 + userData:
11 + assetBundleName:
12 + assetBundleVariant:
1 +//======= Copyright (c) Valve Corporation, All rights reserved. ===============
2 +using UnityEngine;
3 +using System.Collections;
4 +
5 +namespace Valve.VR.Extras
6 +{
7 + public class SteamVR_LaserPointer : MonoBehaviour
8 + {
9 + public SteamVR_Behaviour_Pose pose;
10 +
11 + //public SteamVR_Action_Boolean interactWithUI = SteamVR_Input.__actions_default_in_InteractUI;
12 + public SteamVR_Action_Boolean interactWithUI = SteamVR_Input.GetBooleanAction("InteractUI");
13 +
14 + public bool active = true;
15 + public Color color;
16 + public float thickness = 0.002f;
17 + public Color clickColor = Color.green;
18 + public GameObject holder;
19 + public GameObject pointer;
20 + bool isActive = false;
21 + public bool addRigidBody = false;
22 + public Transform reference;
23 + public event PointerEventHandler PointerIn;
24 + public event PointerEventHandler PointerOut;
25 + public event PointerEventHandler PointerClick;
26 +
27 + Transform previousContact = null;
28 +
29 +
30 + private void Start()
31 + {
32 + if (pose == null)
33 + pose = this.GetComponent<SteamVR_Behaviour_Pose>();
34 + if (pose == null)
35 + Debug.LogError("No SteamVR_Behaviour_Pose component found on this object", this);
36 +
37 + if (interactWithUI == null)
38 + Debug.LogError("No ui interaction action has been set on this component.", this);
39 +
40 +
41 + holder = new GameObject();
42 + holder.transform.parent = this.transform;
43 + holder.transform.localPosition = Vector3.zero;
44 + holder.transform.localRotation = Quaternion.identity;
45 +
46 + pointer = GameObject.CreatePrimitive(PrimitiveType.Cube);
47 + pointer.transform.parent = holder.transform;
48 + pointer.transform.localScale = new Vector3(thickness, thickness, 100f);
49 + pointer.transform.localPosition = new Vector3(0f, 0f, 50f);
50 + pointer.transform.localRotation = Quaternion.identity;
51 + BoxCollider collider = pointer.GetComponent<BoxCollider>();
52 + if (addRigidBody)
53 + {
54 + if (collider)
55 + {
56 + collider.isTrigger = true;
57 + }
58 + Rigidbody rigidBody = pointer.AddComponent<Rigidbody>();
59 + rigidBody.isKinematic = true;
60 + }
61 + else
62 + {
63 + if (collider)
64 + {
65 + Object.Destroy(collider);
66 + }
67 + }
68 + Material newMaterial = new Material(Shader.Find("Unlit/Color"));
69 + newMaterial.SetColor("_Color", color);
70 + pointer.GetComponent<MeshRenderer>().material = newMaterial;
71 + }
72 +
73 + public virtual void OnPointerIn(PointerEventArgs e)
74 + {
75 + if (PointerIn != null)
76 + PointerIn(this, e);
77 + }
78 +
79 + public virtual void OnPointerClick(PointerEventArgs e)
80 + {
81 + if (PointerClick != null)
82 + PointerClick(this, e);
83 + }
84 +
85 + public virtual void OnPointerOut(PointerEventArgs e)
86 + {
87 + if (PointerOut != null)
88 + PointerOut(this, e);
89 + }
90 +
91 +
92 + private void Update()
93 + {
94 + if (!isActive)
95 + {
96 + isActive = true;
97 + this.transform.GetChild(0).gameObject.SetActive(true);
98 + }
99 +
100 + float dist = 100f;
101 +
102 + Ray raycast = new Ray(transform.position, transform.forward);
103 + RaycastHit hit;
104 + bool bHit = Physics.Raycast(raycast, out hit);
105 +
106 + if (previousContact && previousContact != hit.transform)
107 + {
108 + PointerEventArgs args = new PointerEventArgs();
109 + args.fromInputSource = pose.inputSource;
110 + args.distance = 0f;
111 + args.flags = 0;
112 + args.target = previousContact;
113 + OnPointerOut(args);
114 + previousContact = null;
115 + }
116 + if (bHit && previousContact != hit.transform)
117 + {
118 + PointerEventArgs argsIn = new PointerEventArgs();
119 + argsIn.fromInputSource = pose.inputSource;
120 + argsIn.distance = hit.distance;
121 + argsIn.flags = 0;
122 + argsIn.target = hit.transform;
123 + OnPointerIn(argsIn);
124 + previousContact = hit.transform;
125 + }
126 + if (!bHit)
127 + {
128 + previousContact = null;
129 + }
130 + if (bHit && hit.distance < 100f)
131 + {
132 + dist = hit.distance;
133 + }
134 +
135 + if (bHit && interactWithUI.GetStateUp(pose.inputSource))
136 + {
137 + PointerEventArgs argsClick = new PointerEventArgs();
138 + argsClick.fromInputSource = pose.inputSource;
139 + argsClick.distance = hit.distance;
140 + argsClick.flags = 0;
141 + argsClick.target = hit.transform;
142 + OnPointerClick(argsClick);
143 + }
144 +
145 + if (interactWithUI != null && interactWithUI.GetState(pose.inputSource))
146 + {
147 + pointer.transform.localScale = new Vector3(thickness * 5f, thickness * 5f, dist);
148 + pointer.GetComponent<MeshRenderer>().material.color = clickColor;
149 + }
150 + else
151 + {
152 + pointer.transform.localScale = new Vector3(thickness, thickness, dist);
153 + pointer.GetComponent<MeshRenderer>().material.color = color;
154 + }
155 + pointer.transform.localPosition = new Vector3(0f, 0f, dist / 2f);
156 + }
157 + }
158 +
159 + public struct PointerEventArgs
160 + {
161 + public SteamVR_Input_Sources fromInputSource;
162 + public uint flags;
163 + public float distance;
164 + public Transform target;
165 + }
166 +
167 + public delegate void PointerEventHandler(object sender, PointerEventArgs e);
168 +}
...\ No newline at end of file ...\ No newline at end of file
1 +fileFormatVersion: 2
2 +guid: b2f511c1adaa1e94ebe7ca97bbcabd17
3 +timeCreated: 1539298734
4 +licenseType: Store
5 +MonoImporter:
6 + serializedVersion: 2
7 + defaultReferences: []
8 + executionOrder: 0
9 + icon: {instanceID: 0}
10 + userData:
11 + assetBundleName:
12 + assetBundleVariant:
1 +fileFormatVersion: 2
2 +guid: f2343db151bc3864e9088f8e4230cdc1
3 +timeCreated: 1539298758
4 +licenseType: Store
5 +DefaultImporter:
6 + userData:
7 + assetBundleName:
8 + assetBundleVariant:
1 +fileFormatVersion: 2
2 +guid: 73743b10c3912094a8a17bc7ac370c15
3 +timeCreated: 1550629235
4 +licenseType: Store
5 +DefaultImporter:
6 + userData:
7 + assetBundleName:
8 + assetBundleVariant:
1 +fileFormatVersion: 2
2 +guid: 4b6669fb4e4df9c48926f02b694be9d1
3 +timeCreated: 1437433018
4 +licenseType: Store
5 +DefaultImporter:
6 + userData:
7 + assetBundleName:
8 + assetBundleVariant:
1 +//======= Copyright (c) Valve Corporation, All rights reserved. ===============
2 +using UnityEngine;
3 +using System.Collections;
4 +
5 +namespace Valve.VR.Extras
6 +{
7 + [RequireComponent(typeof(SteamVR_TrackedObject))]
8 + public class SteamVR_TestThrow : MonoBehaviour
9 + {
10 + public GameObject prefab;
11 + public Rigidbody attachPoint;
12 +
13 + public SteamVR_Action_Boolean spawn = SteamVR_Input.GetAction<SteamVR_Action_Boolean>("InteractUI");
14 +
15 + SteamVR_Behaviour_Pose trackedObj;
16 + FixedJoint joint;
17 +
18 + private void Awake()
19 + {
20 + trackedObj = GetComponent<SteamVR_Behaviour_Pose>();
21 + }
22 +
23 + private void FixedUpdate()
24 + {
25 + if (joint == null && spawn.GetStateDown(trackedObj.inputSource))
26 + {
27 + GameObject go = GameObject.Instantiate(prefab);
28 + go.transform.position = attachPoint.transform.position;
29 +
30 + joint = go.AddComponent<FixedJoint>();
31 + joint.connectedBody = attachPoint;
32 + }
33 + else if (joint != null && spawn.GetStateUp(trackedObj.inputSource))
34 + {
35 + GameObject go = joint.gameObject;
36 + Rigidbody rigidbody = go.GetComponent<Rigidbody>();
37 + Object.DestroyImmediate(joint);
38 + joint = null;
39 + Object.Destroy(go, 15.0f);
40 +
41 + // We should probably apply the offset between trackedObj.transform.position
42 + // and device.transform.pos to insert into the physics sim at the correct
43 + // location, however, we would then want to predict ahead the visual representation
44 + // by the same amount we are predicting our render poses.
45 +
46 + Transform origin = trackedObj.origin ? trackedObj.origin : trackedObj.transform.parent;
47 + if (origin != null)
48 + {
49 + rigidbody.velocity = origin.TransformVector(trackedObj.GetVelocity());
50 + rigidbody.angularVelocity = origin.TransformVector(trackedObj.GetAngularVelocity());
51 + }
52 + else
53 + {
54 + rigidbody.velocity = trackedObj.GetVelocity();
55 + rigidbody.angularVelocity = trackedObj.GetAngularVelocity();
56 + }
57 +
58 + rigidbody.maxAngularVelocity = rigidbody.angularVelocity.magnitude;
59 + }
60 + }
61 + }
62 +}
...\ No newline at end of file ...\ No newline at end of file
1 +fileFormatVersion: 2
2 +guid: ff4f36585e15b1942827390ff1a92502
3 +timeCreated: 1437513988
4 +licenseType: Store
5 +MonoImporter:
6 + serializedVersion: 2
7 + defaultReferences: []
8 + executionOrder: 0
9 + icon: {instanceID: 0}
10 + userData:
11 + assetBundleName:
12 + assetBundleVariant:
1 +fileFormatVersion: 2
2 +guid: 0d936163b5e9a5047b5e4ba5afaf5126
3 +timeCreated: 1437513966
4 +licenseType: Store
5 +DefaultImporter:
6 + userData:
7 + assetBundleName:
8 + assetBundleVariant:
1 +//======= Copyright (c) Valve Corporation, All rights reserved. ===============
2 +using UnityEngine;
3 +
4 +namespace Valve.VR.Extras
5 +{
6 + public class SteamVR_TestTrackedCamera : MonoBehaviour
7 + {
8 + public Material material;
9 + public Transform target;
10 + public bool undistorted = true;
11 + public bool cropped = true;
12 +
13 + private void OnEnable()
14 + {
15 + // The video stream must be symmetrically acquired and released in
16 + // order to properly disable the stream once there are no consumers.
17 + SteamVR_TrackedCamera.VideoStreamTexture source = SteamVR_TrackedCamera.Source(undistorted);
18 + source.Acquire();
19 +
20 + // Auto-disable if no camera is present.
21 + if (!source.hasCamera)
22 + enabled = false;
23 + }
24 +
25 + private void OnDisable()
26 + {
27 + // Clear the texture when no longer active.
28 + material.mainTexture = null;
29 +
30 + // The video stream must be symmetrically acquired and released in
31 + // order to properly disable the stream once there are no consumers.
32 + SteamVR_TrackedCamera.VideoStreamTexture source = SteamVR_TrackedCamera.Source(undistorted);
33 + source.Release();
34 + }
35 +
36 + private void Update()
37 + {
38 + SteamVR_TrackedCamera.VideoStreamTexture source = SteamVR_TrackedCamera.Source(undistorted);
39 + Texture2D texture = source.texture;
40 + if (texture == null)
41 + {
42 + return;
43 + }
44 +
45 + // Apply the latest texture to the material. This must be performed
46 + // every frame since the underlying texture is actually part of a ring
47 + // buffer which is updated in lock-step with its associated pose.
48 + // (You actually really only need to call any of the accessors which
49 + // internally call Update on the SteamVR_TrackedCamera.VideoStreamTexture).
50 + material.mainTexture = texture;
51 +
52 + // Adjust the height of the quad based on the aspect to keep the texels square.
53 + float aspect = (float)texture.width / texture.height;
54 +
55 + // The undistorted video feed has 'bad' areas near the edges where the original
56 + // square texture feed is stretched to undo the fisheye from the lens.
57 + // Therefore, you'll want to crop it to the specified frameBounds to remove this.
58 + if (cropped)
59 + {
60 + VRTextureBounds_t bounds = source.frameBounds;
61 + material.mainTextureOffset = new Vector2(bounds.uMin, bounds.vMin);
62 +
63 + float du = bounds.uMax - bounds.uMin;
64 + float dv = bounds.vMax - bounds.vMin;
65 + material.mainTextureScale = new Vector2(du, dv);
66 +
67 + aspect *= Mathf.Abs(du / dv);
68 + }
69 + else
70 + {
71 + material.mainTextureOffset = Vector2.zero;
72 + material.mainTextureScale = new Vector2(1, -1);
73 + }
74 +
75 + target.localScale = new Vector3(1, 1.0f / aspect, 1);
76 +
77 + // Apply the pose that this frame was recorded at.
78 + if (source.hasTracking)
79 + {
80 + SteamVR_Utils.RigidTransform rigidTransform = source.transform;
81 + target.localPosition = rigidTransform.pos;
82 + target.localRotation = rigidTransform.rot;
83 + }
84 + }
85 + }
86 +}
...\ No newline at end of file ...\ No newline at end of file
1 +fileFormatVersion: 2
2 +guid: 8b18b36a995ecb04599f35c2741be8d5
3 +timeCreated: 1465946679
4 +licenseType: Store
5 +MonoImporter:
6 + serializedVersion: 2
7 + defaultReferences: []
8 + executionOrder: 0
9 + icon: {instanceID: 0}
10 + userData:
11 + assetBundleName:
12 + assetBundleVariant:
1 +%YAML 1.1
2 +%TAG !u! tag:unity3d.com,2011:
3 +--- !u!21 &2100000
4 +Material:
5 + serializedVersion: 6
6 + m_ObjectHideFlags: 0
7 + m_PrefabParentObject: {fileID: 0}
8 + m_PrefabInternal: {fileID: 0}
9 + m_Name: SteamVR_TestTrackedCamera
10 + m_Shader: {fileID: 10752, guid: 0000000000000000f000000000000000, type: 0}
11 + m_ShaderKeywords: _EMISSION
12 + m_LightmapFlags: 1
13 + m_CustomRenderQueue: -1
14 + stringTagMap: {}
15 + m_SavedProperties:
16 + serializedVersion: 2
17 + m_TexEnvs:
18 + - first:
19 + name: _BumpMap
20 + second:
21 + m_Texture: {fileID: 0}
22 + m_Scale: {x: 1, y: 1}
23 + m_Offset: {x: 0, y: 0}
24 + - first:
25 + name: _DetailAlbedoMap
26 + second:
27 + m_Texture: {fileID: 0}
28 + m_Scale: {x: 1, y: 1}
29 + m_Offset: {x: 0, y: 0}
30 + - first:
31 + name: _DetailMask
32 + second:
33 + m_Texture: {fileID: 0}
34 + m_Scale: {x: 1, y: 1}
35 + m_Offset: {x: 0, y: 0}
36 + - first:
37 + name: _DetailNormalMap
38 + second:
39 + m_Texture: {fileID: 0}
40 + m_Scale: {x: 1, y: 1}
41 + m_Offset: {x: 0, y: 0}
42 + - first:
43 + name: _EmissionMap
44 + second:
45 + m_Texture: {fileID: 0}
46 + m_Scale: {x: 1, y: 1}
47 + m_Offset: {x: 0, y: 0}
48 + - first:
49 + name: _MainTex
50 + second:
51 + m_Texture: {fileID: 0}
52 + m_Scale: {x: 0.5, y: -0.5}
53 + m_Offset: {x: 0.25, y: 0.75}
54 + - first:
55 + name: _MetallicGlossMap
56 + second:
57 + m_Texture: {fileID: 0}
58 + m_Scale: {x: 1, y: 1}
59 + m_Offset: {x: 0, y: 0}
60 + - first:
61 + name: _OcclusionMap
62 + second:
63 + m_Texture: {fileID: 0}
64 + m_Scale: {x: 1, y: 1}
65 + m_Offset: {x: 0, y: 0}
66 + - first:
67 + name: _ParallaxMap
68 + second:
69 + m_Texture: {fileID: 0}
70 + m_Scale: {x: 1, y: 1}
71 + m_Offset: {x: 0, y: 0}
72 + m_Floats:
73 + - first:
74 + name: _BumpScale
75 + second: 1
76 + - first:
77 + name: _Cutoff
78 + second: 0.5
79 + - first:
80 + name: _DetailNormalMapScale
81 + second: 1
82 + - first:
83 + name: _DstBlend
84 + second: 0
85 + - first:
86 + name: _GlossMapScale
87 + second: 1
88 + - first:
89 + name: _Glossiness
90 + second: 0.5
91 + - first:
92 + name: _GlossyReflections
93 + second: 1
94 + - first:
95 + name: _Metallic
96 + second: 0
97 + - first:
98 + name: _Mode
99 + second: 0
100 + - first:
101 + name: _OcclusionStrength
102 + second: 1
103 + - first:
104 + name: _Parallax
105 + second: 0.02
106 + - first:
107 + name: _SmoothnessTextureChannel
108 + second: 0
109 + - first:
110 + name: _SpecularHighlights
111 + second: 1
112 + - first:
113 + name: _SrcBlend
114 + second: 1
115 + - first:
116 + name: _UVSec
117 + second: 0
118 + - first:
119 + name: _ZWrite
120 + second: 1
121 + m_Colors:
122 + - first:
123 + name: _Color
124 + second: {r: 1, g: 1, b: 1, a: 1}
125 + - first:
126 + name: _EmissionColor
127 + second: {r: 0, g: 0, b: 0, a: 1}
1 +fileFormatVersion: 2
2 +guid: 99ee8d48ccf36264e9d9a72baa681249
3 +timeCreated: 1465950289
4 +licenseType: Store
5 +NativeFormatImporter:
6 + userData:
7 + assetBundleName:
8 + assetBundleVariant:
1 +fileFormatVersion: 2
2 +guid: 7fb811b0ffe615b4dbf1d5e6ced385fd
3 +timeCreated: 1464227836
4 +licenseType: Store
5 +DefaultImporter:
6 + userData:
7 + assetBundleName:
8 + assetBundleVariant:
1 +fileFormatVersion: 2
2 +guid: 37d1a399d1ea2d24c8f27e07036b83fb
3 +folderAsset: yes
4 +timeCreated: 1532646714
5 +licenseType: Store
6 +DefaultImporter:
7 + userData:
8 + assetBundleName:
9 + assetBundleVariant:
1 +fileFormatVersion: 2
2 +guid: a9d04296988f9324d98f54789595e5bf
3 +timeCreated: 1547854934
4 +licenseType: Store
5 +TextureImporter:
6 + fileIDToRecycleName: {}
7 + serializedVersion: 2
8 + mipmaps:
9 + mipMapMode: 0
10 + enableMipMap: 0
11 + linearTexture: 1
12 + correctGamma: 0
13 + fadeOut: 0
14 + borderMipMap: 0
15 + mipMapFadeDistanceStart: 1
16 + mipMapFadeDistanceEnd: 3
17 + bumpmap:
18 + convertToNormalMap: 0
19 + externalNormalMap: 0
20 + heightScale: 0.25
21 + normalMapFilter: 0
22 + isReadable: 0
23 + grayScaleToAlpha: 0
24 + generateCubemap: 0
25 + cubemapConvolution: 0
26 + cubemapConvolutionSteps: 7
27 + cubemapConvolutionExponent: 1.5
28 + seamlessCubemap: 0
29 + textureFormat: -1
30 + maxTextureSize: 128
31 + textureSettings:
32 + filterMode: 2
33 + aniso: 1
34 + mipBias: -1
35 + wrapMode: 1
36 + nPOTScale: 0
37 + lightmap: 0
38 + rGBM: 0
39 + compressionQuality: 50
40 + allowsAlphaSplitting: 0
41 + spriteMode: 0
42 + spriteExtrude: 1
43 + spriteMeshType: 1
44 + alignment: 0
45 + spritePivot: {x: 0.5, y: 0.5}
46 + spriteBorder: {x: 0, y: 0, z: 0, w: 0}
47 + spritePixelsToUnits: 100
48 + alphaIsTransparency: 1
49 + spriteTessellationDetail: -1
50 + textureType: 2
51 + buildTargetSettings: []
52 + spriteSheet:
53 + serializedVersion: 2
54 + sprites: []
55 + outline: []
56 + spritePackingTag:
57 + userData:
58 + assetBundleName:
59 + assetBundleVariant:
1 +fileFormatVersion: 2
2 +guid: 200a36575873a1d40baa790e18dafe5d
3 +timeCreated: 1532646733
4 +licenseType: Store
5 +TextureImporter:
6 + fileIDToRecycleName: {}
7 + serializedVersion: 2
8 + mipmaps:
9 + mipMapMode: 0
10 + enableMipMap: 0
11 + linearTexture: 1
12 + correctGamma: 0
13 + fadeOut: 0
14 + borderMipMap: 0
15 + mipMapFadeDistanceStart: 1
16 + mipMapFadeDistanceEnd: 3
17 + bumpmap:
18 + convertToNormalMap: 0
19 + externalNormalMap: 0
20 + heightScale: 0.25
21 + normalMapFilter: 0
22 + isReadable: 0
23 + grayScaleToAlpha: 0
24 + generateCubemap: 0
25 + cubemapConvolution: 0
26 + cubemapConvolutionSteps: 7
27 + cubemapConvolutionExponent: 1.5
28 + seamlessCubemap: 0
29 + textureFormat: -1
30 + maxTextureSize: 2048
31 + textureSettings:
32 + filterMode: -1
33 + aniso: 1
34 + mipBias: -1
35 + wrapMode: 1
36 + nPOTScale: 0
37 + lightmap: 0
38 + rGBM: 0
39 + compressionQuality: 50
40 + allowsAlphaSplitting: 0
41 + spriteMode: 0
42 + spriteExtrude: 1
43 + spriteMeshType: 1
44 + alignment: 0
45 + spritePivot: {x: 0.5, y: 0.5}
46 + spriteBorder: {x: 0, y: 0, z: 0, w: 0}
47 + spritePixelsToUnits: 100
48 + alphaIsTransparency: 1
49 + spriteTessellationDetail: -1
50 + textureType: 2
51 + buildTargetSettings: []
52 + spriteSheet:
53 + serializedVersion: 2
54 + sprites: []
55 + outline: []
56 + spritePackingTag:
57 + userData:
58 + assetBundleName:
59 + assetBundleVariant:
1 +fileFormatVersion: 2
2 +guid: 034ad660702976d4da58a18ccae19443
3 +folderAsset: yes
4 +timeCreated: 1521243381
5 +licenseType: Store
6 +DefaultImporter:
7 + userData:
8 + assetBundleName:
9 + assetBundleVariant:
1 +fileFormatVersion: 2
2 +guid: 353612abd09de3a478236e679e220759
3 +folderAsset: yes
4 +timeCreated: 1548282626
5 +licenseType: Store
6 +DefaultImporter:
7 + userData:
8 + assetBundleName:
9 + assetBundleVariant:
1 +//======= Copyright (c) Valve Corporation, All rights reserved. ===============
2 +using System;
3 +using UnityEngine.Events;
4 +
5 +namespace Valve.VR
6 +{
7 + [Serializable]
8 + public class SteamVR_Behaviour_BooleanEvent : UnityEvent<SteamVR_Behaviour_Boolean, SteamVR_Input_Sources, bool> { }
9 +}
...\ No newline at end of file ...\ No newline at end of file
1 +fileFormatVersion: 2
2 +guid: 59250d64a1ce9a44891e9bb0b3d71e6b
3 +timeCreated: 1548282626
4 +licenseType: Store
5 +MonoImporter:
6 + serializedVersion: 2
7 + defaultReferences: []
8 + executionOrder: 0
9 + icon: {instanceID: 0}
10 + userData:
11 + assetBundleName:
12 + assetBundleVariant:
1 +//======= Copyright (c) Valve Corporation, All rights reserved. ===============
2 +
3 +using System;
4 +using UnityEngine.Events;
5 +
6 +namespace Valve.VR
7 +{
8 + [Serializable]
9 + public class SteamVR_Behaviour_PoseEvent : UnityEvent<SteamVR_Behaviour_Pose, SteamVR_Input_Sources> { }
10 +}
...\ No newline at end of file ...\ No newline at end of file
1 +fileFormatVersion: 2
2 +guid: d77e49c3174e18045ab27a1029c6a977
3 +timeCreated: 1548282627
4 +licenseType: Store
5 +MonoImporter:
6 + serializedVersion: 2
7 + defaultReferences: []
8 + executionOrder: 0
9 + icon: {instanceID: 0}
10 + userData:
11 + assetBundleName:
12 + assetBundleVariant:
1 +//======= Copyright (c) Valve Corporation, All rights reserved. ===============
2 +
3 +using System;
4 +using UnityEngine.Events;
5 +
6 +namespace Valve.VR
7 +{
8 + [Serializable]
9 + public class SteamVR_Behaviour_Pose_ConnectedChangedEvent : UnityEvent<SteamVR_Behaviour_Pose, SteamVR_Input_Sources, bool> { }
10 +}
...\ No newline at end of file ...\ No newline at end of file
1 +fileFormatVersion: 2
2 +guid: f0abecbe8a5e4e04dab8f886e1d6d070
3 +timeCreated: 1548282627
4 +licenseType: Store
5 +MonoImporter:
6 + serializedVersion: 2
7 + defaultReferences: []
8 + executionOrder: 0
9 + icon: {instanceID: 0}
10 + userData:
11 + assetBundleName:
12 + assetBundleVariant:
1 +//======= Copyright (c) Valve Corporation, All rights reserved. ===============
2 +
3 +using System;
4 +using UnityEngine.Events;
5 +
6 +namespace Valve.VR
7 +{
8 + [Serializable]
9 + public class SteamVR_Behaviour_Pose_DeviceIndexChangedEvent : UnityEvent<SteamVR_Behaviour_Pose, SteamVR_Input_Sources, int> { }
10 +}
...\ No newline at end of file ...\ No newline at end of file
1 +fileFormatVersion: 2
2 +guid: bc42b626f4ef1264ebfc0393f40df5c9
3 +timeCreated: 1548282626
4 +licenseType: Store
5 +MonoImporter:
6 + serializedVersion: 2
7 + defaultReferences: []
8 + executionOrder: 0
9 + icon: {instanceID: 0}
10 + userData:
11 + assetBundleName:
12 + assetBundleVariant:
1 +//======= Copyright (c) Valve Corporation, All rights reserved. ===============
2 +
3 +using System;
4 +using UnityEngine.Events;
5 +
6 +namespace Valve.VR
7 +{
8 + [Serializable]
9 + public class SteamVR_Behaviour_Pose_TrackingChangedEvent : UnityEvent<SteamVR_Behaviour_Pose, SteamVR_Input_Sources, ETrackingResult> { }
10 +}
...\ No newline at end of file ...\ No newline at end of file
1 +fileFormatVersion: 2
2 +guid: 62c981c44fe9a6046bb0766cb96bdf65
3 +timeCreated: 1548282626
4 +licenseType: Store
5 +MonoImporter:
6 + serializedVersion: 2
7 + defaultReferences: []
8 + executionOrder: 0
9 + icon: {instanceID: 0}
10 + userData:
11 + assetBundleName:
12 + assetBundleVariant:
1 +//======= Copyright (c) Valve Corporation, All rights reserved. ===============
2 +
3 +using System;
4 +using UnityEngine.Events;
5 +
6 +namespace Valve.VR
7 +{
8 + [Serializable]
9 + public class SteamVR_Behaviour_SingleEvent : UnityEvent<SteamVR_Behaviour_Single, SteamVR_Input_Sources, float, float> { }
10 +}
...\ No newline at end of file ...\ No newline at end of file
1 +fileFormatVersion: 2
2 +guid: b8fd33c9d8ff2114a8b6a59629165318
3 +timeCreated: 1548282626
4 +licenseType: Store
5 +MonoImporter:
6 + serializedVersion: 2
7 + defaultReferences: []
8 + executionOrder: 0
9 + icon: {instanceID: 0}
10 + userData:
11 + assetBundleName:
12 + assetBundleVariant:
1 +//======= Copyright (c) Valve Corporation, All rights reserved. ===============
2 +
3 +using System;
4 +using UnityEngine.Events;
5 +
6 +namespace Valve.VR
7 +{
8 + [Serializable]
9 + public class SteamVR_Behaviour_SkeletonEvent : UnityEvent<SteamVR_Behaviour_Skeleton, SteamVR_Input_Sources> { }
10 +}
...\ No newline at end of file ...\ No newline at end of file
1 +fileFormatVersion: 2
2 +guid: c56ae57c82c46674ea85a60fd6ba9334
3 +timeCreated: 1548282626
4 +licenseType: Store
5 +MonoImporter:
6 + serializedVersion: 2
7 + defaultReferences: []
8 + executionOrder: 0
9 + icon: {instanceID: 0}
10 + userData:
11 + assetBundleName:
12 + assetBundleVariant:
1 +//======= Copyright (c) Valve Corporation, All rights reserved. ===============
2 +
3 +using System;
4 +using UnityEngine.Events;
5 +
6 +namespace Valve.VR
7 +{
8 + [Serializable]
9 + public class SteamVR_Behaviour_Skeleton_ConnectedChangedEvent : UnityEvent<SteamVR_Behaviour_Skeleton, SteamVR_Input_Sources, bool> { }
10 +}
...\ No newline at end of file ...\ No newline at end of file
1 +fileFormatVersion: 2
2 +guid: 431bf7eb5ceb24a448dc44a2ed8d8243
3 +timeCreated: 1548282626
4 +licenseType: Store
5 +MonoImporter:
6 + serializedVersion: 2
7 + defaultReferences: []
8 + executionOrder: 0
9 + icon: {instanceID: 0}
10 + userData:
11 + assetBundleName:
12 + assetBundleVariant:
1 +//======= Copyright (c) Valve Corporation, All rights reserved. ===============
2 +
3 +using System;
4 +using UnityEngine.Events;
5 +
6 +namespace Valve.VR
7 +{
8 + [Serializable]
9 + public class SteamVR_Behaviour_Skeleton_TrackingChangedEvent : UnityEvent<SteamVR_Behaviour_Skeleton, SteamVR_Input_Sources, ETrackingResult> { }
10 +}
...\ No newline at end of file ...\ No newline at end of file
1 +fileFormatVersion: 2
2 +guid: 7461d65099840d840af0e25e6afda525
3 +timeCreated: 1548282626
4 +licenseType: Store
5 +MonoImporter:
6 + serializedVersion: 2
7 + defaultReferences: []
8 + executionOrder: 0
9 + icon: {instanceID: 0}
10 + userData:
11 + assetBundleName:
12 + assetBundleVariant:
1 +//======= Copyright (c) Valve Corporation, All rights reserved. ===============
2 +
3 +using System;
4 +using UnityEngine;
5 +using UnityEngine.Events;
6 +
7 +namespace Valve.VR
8 +{
9 + [Serializable]
10 + public class SteamVR_Behaviour_Vector2Event : UnityEvent<SteamVR_Behaviour_Vector2, SteamVR_Input_Sources, Vector2, Vector2> { }
11 +}
...\ No newline at end of file ...\ No newline at end of file
1 +fileFormatVersion: 2
2 +guid: 091545c123a858440b2e32a3f299a923
3 +timeCreated: 1548282626
4 +licenseType: Store
5 +MonoImporter:
6 + serializedVersion: 2
7 + defaultReferences: []
8 + executionOrder: 0
9 + icon: {instanceID: 0}
10 + userData:
11 + assetBundleName:
12 + assetBundleVariant:
1 +//======= Copyright (c) Valve Corporation, All rights reserved. ===============
2 +
3 +using System;
4 +using UnityEngine;
5 +using UnityEngine.Events;
6 +
7 +namespace Valve.VR
8 +{
9 + [Serializable]
10 + public class SteamVR_Behaviour_Vector3Event : UnityEvent<SteamVR_Behaviour_Vector3, SteamVR_Input_Sources, Vector3, Vector3> { }
11 +}
...\ No newline at end of file ...\ No newline at end of file
1 +fileFormatVersion: 2
2 +guid: 99c31ec1b21aa424987b0162f9971dc6
3 +timeCreated: 1548282626
4 +licenseType: Store
5 +MonoImporter:
6 + serializedVersion: 2
7 + defaultReferences: []
8 + executionOrder: 0
9 + icon: {instanceID: 0}
10 + userData:
11 + assetBundleName:
12 + assetBundleVariant:
1 +fileFormatVersion: 2
2 +guid: fed05885250fc2c4daab18c7df3717bf
3 +folderAsset: yes
4 +timeCreated: 1521243387
5 +licenseType: Store
6 +DefaultImporter:
7 + userData:
8 + assetBundleName:
9 + assetBundleVariant:
This diff could not be displayed because it is too large.
1 +fileFormatVersion: 2
2 +guid: 7836f978f062019499564a455654e74a
3 +timeCreated: 1521247191
4 +licenseType: Store
5 +NativeFormatImporter:
6 + userData:
7 + assetBundleName:
8 + assetBundleVariant:
1 +fileFormatVersion: 2
2 +guid: 7d5e740d15d7ca249b884d30ff558bc1
3 +folderAsset: yes
4 +timeCreated: 1547747995
5 +licenseType: Store
6 +DefaultImporter:
7 + userData:
8 + assetBundleName:
9 + assetBundleVariant:
1 +fileFormatVersion: 2
2 +guid: 16f1e3ee1a373e34ea3a84a7afa0a259
3 +folderAsset: yes
4 +timeCreated: 1547747995
5 +licenseType: Store
6 +DefaultImporter:
7 + userData:
8 + assetBundleName:
9 + assetBundleVariant:
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff could not be displayed because it is too large.