Updated oculus stuff

This commit is contained in:
Chris Midkiff
2018-10-09 20:59:57 -04:00
parent 1e7362c19f
commit 9b7f63739e
957 changed files with 128988 additions and 588 deletions

View File

@@ -2,7 +2,7 @@ fileFormatVersion: 2
guid: 1f92828e69374384b8cb197653871a6e
folderAsset: yes
timeCreated: 1502989983
licenseType: Pro
licenseType: Store
DefaultImporter:
userData:
assetBundleName:

View File

@@ -1,7 +1,7 @@
fileFormatVersion: 2
guid: 70818bad1fe6859439b190a61dfb6eb8
timeCreated: 1503089686
licenseType: Pro
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []

View File

@@ -1,7 +1,7 @@
fileFormatVersion: 2
guid: 829a382f3380d4b46ad9670463232a0b
timeCreated: 1502990005
licenseType: Pro
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []

View File

@@ -1,7 +1,7 @@
fileFormatVersion: 2
guid: 43bf91d46b2eb874a842be95aee2cc9a
timeCreated: 1502992822
licenseType: Pro
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []

View File

@@ -1,7 +1,7 @@
fileFormatVersion: 2
guid: 8e9d1c62d6c68c7429ce265558cfd2b2
timeCreated: 1502990248
licenseType: Pro
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []

View File

@@ -1,7 +1,7 @@
fileFormatVersion: 2
guid: 2c109ff55176f71418ec2c06d1b5d28e
timeCreated: 1502990231
licenseType: Pro
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []

View File

@@ -1,7 +1,7 @@
fileFormatVersion: 2
guid: 3c02efcdd3fb2aa4e9c641b0c2a54b9a
timeCreated: 1502990248
licenseType: Pro
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []

View File

@@ -2,7 +2,7 @@ fileFormatVersion: 2
guid: e87d4bbdfc8d17445b4a41760b401026
folderAsset: yes
timeCreated: 1510282190
licenseType: Pro
licenseType: Store
DefaultImporter:
userData:
assetBundleName:

View File

@@ -1,7 +1,7 @@
fileFormatVersion: 2
guid: 9b07d18088099f94fa00fc15e64b2b17
timeCreated: 1502747851
licenseType: Pro
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []

View File

@@ -1,7 +1,7 @@
fileFormatVersion: 2
guid: 332b8e08854932543ba356eec601c0ef
timeCreated: 1470352252
licenseType: Pro
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []

View File

@@ -1,9 +1,9 @@
/************************************************************************************
Copyright : Copyright 2017 Oculus VR, LLC. All Rights reserved.
Copyright : Copyright (c) Facebook Technologies, LLC and its affiliates. All rights reserved.
Licensed under the Oculus VR Rift SDK License Version 3.4.1 (the "License");
you may not use the Oculus VR Rift SDK except in compliance with the License,
Licensed under the Oculus SDK License Version 3.4.1 (the "License");
you may not use the Oculus SDK except in compliance with the License,
which is provided at the time of installation or download, or which
otherwise accompanies this software in either electronic or hard copy form.
@@ -11,7 +11,7 @@ You may obtain a copy of the License at
https://developer.oculus.com/licenses/sdk-3.4.1
Unless required by applicable law or agreed to in writing, the Oculus VR SDK
Unless required by applicable law or agreed to in writing, the Oculus SDK
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
@@ -24,6 +24,14 @@ using System.Collections;
using System.Collections.Generic;
using UnityEngine;
#if UNITY_2017_2_OR_NEWER
using InputTracking = UnityEngine.XR.InputTracking;
using Node = UnityEngine.XR.XRNode;
#else
using InputTracking = UnityEngine.VR.InputTracking;
using Node = UnityEngine.VR.VRNode;
#endif
/// <summary>
/// A head-tracked stereoscopic virtual reality camera rig.
/// </summary>
@@ -136,34 +144,29 @@ public class OVRCameraRig : MonoBehaviour
}
bool monoscopic = OVRManager.instance.monoscopic;
bool hmdPresent = OVRNodeStateProperties.IsHmdPresent();
OVRPose tracker = OVRManager.tracker.GetPose();
trackerAnchor.localRotation = tracker.orientation;
#if UNITY_2017_2_OR_NEWER
centerEyeAnchor.localRotation = UnityEngine.XR.InputTracking.GetLocalRotation(UnityEngine.XR.XRNode.CenterEye);
leftEyeAnchor.localRotation = monoscopic ? centerEyeAnchor.localRotation : UnityEngine.XR.InputTracking.GetLocalRotation(UnityEngine.XR.XRNode.LeftEye);
rightEyeAnchor.localRotation = monoscopic ? centerEyeAnchor.localRotation : UnityEngine.XR.InputTracking.GetLocalRotation(UnityEngine.XR.XRNode.RightEye);
#else
centerEyeAnchor.localRotation = UnityEngine.VR.InputTracking.GetLocalRotation(UnityEngine.VR.VRNode.CenterEye);
leftEyeAnchor.localRotation = monoscopic ? centerEyeAnchor.localRotation : UnityEngine.VR.InputTracking.GetLocalRotation(UnityEngine.VR.VRNode.LeftEye);
rightEyeAnchor.localRotation = monoscopic ? centerEyeAnchor.localRotation : UnityEngine.VR.InputTracking.GetLocalRotation(UnityEngine.VR.VRNode.RightEye);
#endif
leftHandAnchor.localRotation = OVRInput.GetLocalControllerRotation(OVRInput.Controller.LTouch);
rightHandAnchor.localRotation = OVRInput.GetLocalControllerRotation(OVRInput.Controller.RTouch);
Quaternion emulatedRotation = Quaternion.Euler(-OVRManager.instance.headPoseRelativeOffsetRotation.x, -OVRManager.instance.headPoseRelativeOffsetRotation.y, OVRManager.instance.headPoseRelativeOffsetRotation.z);
centerEyeAnchor.localRotation = hmdPresent ? InputTracking.GetLocalRotation(Node.CenterEye) : emulatedRotation;
leftEyeAnchor.localRotation = (!hmdPresent || monoscopic) ? centerEyeAnchor.localRotation : InputTracking.GetLocalRotation(Node.LeftEye);
rightEyeAnchor.localRotation = (!hmdPresent || monoscopic) ? centerEyeAnchor.localRotation : InputTracking.GetLocalRotation(Node.RightEye);
leftHandAnchor.localRotation = InputTracking.GetLocalRotation(Node.LeftHand);
rightHandAnchor.localRotation = InputTracking.GetLocalRotation(Node.RightHand);
trackerAnchor.localPosition = tracker.position;
#if UNITY_2017_2_OR_NEWER
centerEyeAnchor.localPosition = UnityEngine.XR.InputTracking.GetLocalPosition(UnityEngine.XR.XRNode.CenterEye);
leftEyeAnchor.localPosition = monoscopic ? centerEyeAnchor.localPosition : UnityEngine.XR.InputTracking.GetLocalPosition(UnityEngine.XR.XRNode.LeftEye);
rightEyeAnchor.localPosition = monoscopic ? centerEyeAnchor.localPosition : UnityEngine.XR.InputTracking.GetLocalPosition(UnityEngine.XR.XRNode.RightEye);
#else
centerEyeAnchor.localPosition = UnityEngine.VR.InputTracking.GetLocalPosition(UnityEngine.VR.VRNode.CenterEye);
leftEyeAnchor.localPosition = monoscopic ? centerEyeAnchor.localPosition : UnityEngine.VR.InputTracking.GetLocalPosition(UnityEngine.VR.VRNode.LeftEye);
rightEyeAnchor.localPosition = monoscopic ? centerEyeAnchor.localPosition : UnityEngine.VR.InputTracking.GetLocalPosition(UnityEngine.VR.VRNode.RightEye);
#endif
leftHandAnchor.localPosition = OVRInput.GetLocalControllerPosition(OVRInput.Controller.LTouch);
rightHandAnchor.localPosition = OVRInput.GetLocalControllerPosition(OVRInput.Controller.RTouch);
centerEyeAnchor.localPosition = hmdPresent ? InputTracking.GetLocalPosition(Node.CenterEye) : OVRManager.instance.headPoseRelativeOffsetTranslation;
leftEyeAnchor.localPosition = (!hmdPresent || monoscopic) ? centerEyeAnchor.localPosition : InputTracking.GetLocalPosition(Node.LeftEye);
rightEyeAnchor.localPosition = (!hmdPresent || monoscopic) ? centerEyeAnchor.localPosition : InputTracking.GetLocalPosition(Node.RightEye);
leftHandAnchor.localPosition = InputTracking.GetLocalPosition(Node.LeftHand);
rightHandAnchor.localPosition = InputTracking.GetLocalPosition(Node.RightHand);
RaiseUpdatedAnchorsEvent();
}
@@ -293,13 +296,9 @@ public class OVRCameraRig : MonoBehaviour
// The ideal approach would be using UnityEngine.VR.VRNode.TrackingReference, then we would not have to depend on the OVRCameraRig. Unfortunately, it is not available in Unity 5.4.3
OVRPose headPose;
#if UNITY_2017_2_OR_NEWER
headPose.position = UnityEngine.XR.InputTracking.GetLocalPosition(UnityEngine.XR.XRNode.Head);
headPose.orientation = UnityEngine.XR.InputTracking.GetLocalRotation(UnityEngine.XR.XRNode.Head);
#else
headPose.position = UnityEngine.VR.InputTracking.GetLocalPosition(UnityEngine.VR.VRNode.Head);
headPose.orientation = UnityEngine.VR.InputTracking.GetLocalRotation(UnityEngine.VR.VRNode.Head);
#endif
headPose.position = InputTracking.GetLocalPosition(Node.Head);
headPose.orientation = InputTracking.GetLocalRotation(Node.Head);
OVRPose invHeadPose = headPose.Inverse();
Matrix4x4 invHeadMatrix = Matrix4x4.TRS(invHeadPose.position, invHeadPose.orientation, Vector3.one);

View File

@@ -1,9 +1,9 @@
/************************************************************************************
Copyright : Copyright 2017 Oculus VR, LLC. All Rights reserved.
Copyright : Copyright (c) Facebook Technologies, LLC and its affiliates. All rights reserved.
Licensed under the Oculus VR Rift SDK License Version 3.4.1 (the "License");
you may not use the Oculus VR Rift SDK except in compliance with the License,
Licensed under the Oculus SDK License Version 3.4.1 (the "License");
you may not use the Oculus SDK except in compliance with the License,
which is provided at the time of installation or download, or which
otherwise accompanies this software in either electronic or hard copy form.
@@ -11,7 +11,7 @@ You may obtain a copy of the License at
https://developer.oculus.com/licenses/sdk-3.4.1
Unless required by applicable law or agreed to in writing, the Oculus VR SDK
Unless required by applicable law or agreed to in writing, the Oculus SDK
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
@@ -24,6 +24,22 @@ using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
#if UNITY_2017_2_OR_NEWER
using InputTracking = UnityEngine.XR.InputTracking;
using Node = UnityEngine.XR.XRNode;
using NodeState = UnityEngine.XR.XRNodeState;
using Device = UnityEngine.XR.XRDevice;
#elif UNITY_2017_1_OR_NEWER
using InputTracking = UnityEngine.VR.InputTracking;
using Node = UnityEngine.VR.VRNode;
using NodeState = UnityEngine.VR.VRNodeState;
using Device = UnityEngine.VR.VRDevice;
#else
using InputTracking = UnityEngine.VR.InputTracking;
using Node = UnityEngine.VR.VRNode;
using Device = UnityEngine.VR.VRDevice;
#endif
/// <summary>
/// Miscellaneous extension methods that any script can use.
/// </summary>
@@ -35,13 +51,9 @@ public static class OVRExtensions
public static OVRPose ToTrackingSpacePose(this Transform transform, Camera camera)
{
OVRPose headPose;
#if UNITY_2017_2_OR_NEWER
headPose.position = UnityEngine.XR.InputTracking.GetLocalPosition(UnityEngine.XR.XRNode.Head);
headPose.orientation = UnityEngine.XR.InputTracking.GetLocalRotation(UnityEngine.XR.XRNode.Head);
#else
headPose.position = UnityEngine.VR.InputTracking.GetLocalPosition(UnityEngine.VR.VRNode.Head);
headPose.orientation = UnityEngine.VR.InputTracking.GetLocalRotation(UnityEngine.VR.VRNode.Head);
#endif
headPose.position = InputTracking.GetLocalPosition(Node.Head);
headPose.orientation = InputTracking.GetLocalRotation(Node.Head);
var ret = headPose * transform.ToHeadSpacePose(camera);
@@ -55,13 +67,9 @@ public static class OVRExtensions
public static OVRPose ToWorldSpacePose(OVRPose trackingSpacePose)
{
OVRPose headPose;
#if UNITY_2017_2_OR_NEWER
headPose.position = UnityEngine.XR.InputTracking.GetLocalPosition(UnityEngine.XR.XRNode.Head);
headPose.orientation = UnityEngine.XR.InputTracking.GetLocalRotation(UnityEngine.XR.XRNode.Head);
#else
headPose.position = UnityEngine.VR.InputTracking.GetLocalPosition(UnityEngine.VR.VRNode.Head);
headPose.orientation = UnityEngine.VR.InputTracking.GetLocalRotation(UnityEngine.VR.VRNode.Head);
#endif
headPose.position = InputTracking.GetLocalPosition(Node.Head);
headPose.orientation = InputTracking.GetLocalRotation(Node.Head);
// Transform from tracking-Space to head-Space
OVRPose poseInHeadSpace = headPose.Inverse() * trackingSpacePose;
@@ -177,6 +185,129 @@ public static class OVRExtensions
}
}
//4 types of node state properties that can be queried with UnityEngine.XR
public enum NodeStatePropertyType
{
Acceleration,
AngularAcceleration,
Velocity,
AngularVelocity,
}
public static class OVRNodeStateProperties
{
#if UNITY_2017_1_OR_NEWER
private static List<NodeState> nodeStateList = new List<NodeState>();
#endif
public static bool IsHmdPresent()
{
return Device.isPresent;
}
public static Vector3 GetNodeStateProperty(Node nodeType, NodeStatePropertyType propertyType, OVRPlugin.Node ovrpNodeType, OVRPlugin.Step stepType)
{
switch (propertyType)
{
case NodeStatePropertyType.Acceleration:
#if UNITY_2017_1_OR_NEWER
return GetUnityXRNodeState(nodeType, NodeStatePropertyType.Acceleration);
#else
return OVRPlugin.GetNodeAcceleration(ovrpNodeType, stepType).FromFlippedZVector3f();
#endif
case NodeStatePropertyType.AngularAcceleration:
#if UNITY_2017_2_OR_NEWER
return GetUnityXRNodeState(nodeType, NodeStatePropertyType.AngularAcceleration);
#else
return OVRPlugin.GetNodeAngularAcceleration(ovrpNodeType, stepType).FromFlippedZVector3f() * Mathf.Rad2Deg;
#endif
case NodeStatePropertyType.Velocity:
#if UNITY_2017_1_OR_NEWER
return GetUnityXRNodeState(nodeType, NodeStatePropertyType.Velocity);
#else
return OVRPlugin.GetNodeVelocity(ovrpNodeType, stepType).FromFlippedZVector3f();
#endif
case NodeStatePropertyType.AngularVelocity:
#if UNITY_2017_2_OR_NEWER
return GetUnityXRNodeState(nodeType, NodeStatePropertyType.AngularVelocity);
#else
return OVRPlugin.GetNodeAngularVelocity(ovrpNodeType, stepType).FromFlippedZVector3f() * Mathf.Rad2Deg;
#endif
}
return Vector3.zero;
}
#if UNITY_2017_1_OR_NEWER
private static Vector3 GetUnityXRNodeState(Node nodeType, NodeStatePropertyType propertyType)
{
InputTracking.GetNodeStates(nodeStateList);
if (nodeStateList.Count == 0)
return Vector3.zero;
bool nodeStateFound = false;
NodeState requestedNodeState = nodeStateList[0];
for (int i = 0; i < nodeStateList.Count; i++)
{
if (nodeStateList[i].nodeType == nodeType)
{
requestedNodeState = nodeStateList[i];
nodeStateFound = true;
break;
}
}
if (!nodeStateFound)
return Vector3.zero;
Vector3 retVec;
if (propertyType == NodeStatePropertyType.Acceleration)
{
if (requestedNodeState.TryGetAcceleration(out retVec))
{
return retVec;
}
}
else if (propertyType == NodeStatePropertyType.AngularAcceleration)
{
#if UNITY_2017_2_OR_NEWER
if (requestedNodeState.TryGetAngularAcceleration(out retVec))
{
retVec = retVec * Mathf.Rad2Deg;
return retVec;
}
#endif
}
else if (propertyType == NodeStatePropertyType.Velocity)
{
if (requestedNodeState.TryGetVelocity(out retVec))
{
return retVec;
}
}
else if (propertyType == NodeStatePropertyType.AngularVelocity)
{
#if UNITY_2017_2_OR_NEWER
if (requestedNodeState.TryGetAngularVelocity(out retVec))
{
retVec = retVec * Mathf.Rad2Deg;
return retVec;
}
#endif
}
return Vector3.zero;
}
#endif
}
/// <summary>
/// An affine transformation built from a Unity position and orientation.
/// </summary>

View File

@@ -1,9 +1,9 @@
/************************************************************************************
Copyright : Copyright 2017 Oculus VR, LLC. All Rights reserved.
Copyright : Copyright (c) Facebook Technologies, LLC and its affiliates. All rights reserved.
Licensed under the Oculus VR Rift SDK License Version 3.4.1 (the "License");
you may not use the Oculus VR Rift SDK except in compliance with the License,
Licensed under the Oculus SDK License Version 3.4.1 (the "License");
you may not use the Oculus SDK except in compliance with the License,
which is provided at the time of installation or download, or which
otherwise accompanies this software in either electronic or hard copy form.
@@ -11,7 +11,7 @@ You may obtain a copy of the License at
https://developer.oculus.com/licenses/sdk-3.4.1
Unless required by applicable law or agreed to in writing, the Oculus VR SDK
Unless required by applicable law or agreed to in writing, the Oculus SDK
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and

View File

@@ -1,7 +1,7 @@
fileFormatVersion: 2
guid: 563681618daa71b4c89f979b1fd7170b
timeCreated: 1433450365
licenseType: Free
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []

View File

@@ -1,9 +1,9 @@
/************************************************************************************
Copyright : Copyright 2017 Oculus VR, LLC. All Rights reserved.
Copyright : Copyright (c) Facebook Technologies, LLC and its affiliates. All rights reserved.
Licensed under the Oculus VR Rift SDK License Version 3.4.1 (the "License");
you may not use the Oculus VR Rift SDK except in compliance with the License,
Licensed under the Oculus SDK License Version 3.4.1 (the "License");
you may not use the Oculus SDK except in compliance with the License,
which is provided at the time of installation or download, or which
otherwise accompanies this software in either electronic or hard copy form.
@@ -11,7 +11,7 @@ You may obtain a copy of the License at
https://developer.oculus.com/licenses/sdk-3.4.1
Unless required by applicable law or agreed to in writing, the Oculus VR SDK
Unless required by applicable law or agreed to in writing, the Oculus SDK
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
@@ -23,6 +23,22 @@ using System;
using System.Runtime.InteropServices;
using System.Text.RegularExpressions;
using UnityEngine;
using System.Collections.Generic;
#if UNITY_2017_2_OR_NEWER
using InputTracking = UnityEngine.XR.InputTracking;
using Node = UnityEngine.XR.XRNode;
using NodeState = UnityEngine.XR.XRNodeState;
using Settings = UnityEngine.XR.XRSettings;
#elif UNITY_2017_1_OR_NEWER
using InputTracking = UnityEngine.VR.InputTracking;
using Node = UnityEngine.VR.VRNode;
using NodeState = UnityEngine.VR.VRNodeState;
using Settings = UnityEngine.VR.VRSettings;
#else
using Node = UnityEngine.VR.VRNode;
using Settings = UnityEngine.VR.VRSettings;
#endif
/// <summary>
/// Manages an Oculus Rift head-mounted display (HMD).
@@ -156,12 +172,13 @@ public class OVRDisplay
if (!OVRManager.isHmdPresent)
return Vector3.zero;
return OVRPlugin.GetNodeAcceleration(OVRPlugin.Node.Head, OVRPlugin.Step.Render).FromFlippedZVector3f();
return OVRNodeStateProperties.GetNodeStateProperty(Node.Head, NodeStatePropertyType.Acceleration, OVRPlugin.Node.Head, OVRPlugin.Step.Render);
}
}
/// <summary>
/// Gets the current angular acceleration of the head.
/// Gets the current angular acceleration of the head in radians per second per second about each axis.
/// </summary>
public Vector3 angularAcceleration
{
@@ -170,12 +187,13 @@ public class OVRDisplay
if (!OVRManager.isHmdPresent)
return Vector3.zero;
return OVRPlugin.GetNodeAngularAcceleration(OVRPlugin.Node.Head, OVRPlugin.Step.Render).FromFlippedZVector3f() * Mathf.Rad2Deg;
return OVRNodeStateProperties.GetNodeStateProperty(Node.Head, NodeStatePropertyType.AngularAcceleration, OVRPlugin.Node.Head, OVRPlugin.Step.Render);
}
}
/// <summary>
/// Gets the current linear velocity of the head.
/// Gets the current linear velocity of the head in meters per second.
/// </summary>
public Vector3 velocity
{
@@ -184,12 +202,13 @@ public class OVRDisplay
if (!OVRManager.isHmdPresent)
return Vector3.zero;
return OVRPlugin.GetNodeVelocity(OVRPlugin.Node.Head, OVRPlugin.Step.Render).FromFlippedZVector3f();
return OVRNodeStateProperties.GetNodeStateProperty(Node.Head, NodeStatePropertyType.Velocity, OVRPlugin.Node.Head, OVRPlugin.Step.Render);
}
}
/// <summary>
/// Gets the current angular velocity of the head.
/// Gets the current angular velocity of the head in radians per second about each axis.
/// </summary>
public Vector3 angularVelocity
{
@@ -197,7 +216,8 @@ public class OVRDisplay
if (!OVRManager.isHmdPresent)
return Vector3.zero;
return OVRPlugin.GetNodeAngularVelocity(OVRPlugin.Node.Head, OVRPlugin.Step.Render).FromFlippedZVector3f() * Mathf.Rad2Deg;
return OVRNodeStateProperties.GetNodeStateProperty(Node.Head, NodeStatePropertyType.AngularVelocity, OVRPlugin.Node.Head, OVRPlugin.Step.Render);
}
}
@@ -313,10 +333,11 @@ public class OVRDisplay
if (!OVRManager.isHmdPresent)
return;
OVRPlugin.Sizei size = OVRPlugin.GetEyeTextureSize((OVRPlugin.Eye)eye);
int eyeTextureWidth = Settings.eyeTextureWidth;
int eyeTextureHeight = Settings.eyeTextureHeight;
eyeDescs[(int)eye] = new EyeRenderDesc();
eyeDescs[(int)eye].resolution = new Vector2(size.w, size.h);
eyeDescs[(int)eye].resolution = new Vector2(eyeTextureWidth, eyeTextureHeight);
OVRPlugin.Frustumf2 frust;
if (OVRPlugin.GetNodeFrustum2((OVRPlugin.Node)eye, out frust))

View File

@@ -1,7 +1,7 @@
fileFormatVersion: 2
guid: d3b22b858e27329498781f145fa42610
timeCreated: 1463018541
licenseType: Pro
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []

View File

@@ -1,7 +1,7 @@
fileFormatVersion: 2
guid: c123270a848515b458069b5242866451
timeCreated: 1467575852
licenseType: Pro
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []

View File

@@ -0,0 +1,147 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class OVRHeadsetEmulator : MonoBehaviour {
public enum OpMode
{
Off,
EditorOnly,
AlwaysOn
}
public OpMode opMode = OpMode.EditorOnly;
public bool resetHmdPoseOnRelease = true;
public bool resetHmdPoseByMiddleMouseButton = true;
public KeyCode[] activateKeys = new KeyCode[] { KeyCode.LeftControl, KeyCode.RightControl };
public KeyCode[] pitchKeys = new KeyCode[] { KeyCode.LeftAlt, KeyCode.RightAlt };
OVRManager manager;
const float MOUSE_SCALE_X = -2.0f;
const float MOUSE_SCALE_X_PITCH = -2.0f;
const float MOUSE_SCALE_Y = 2.0f;
const float MOUSE_SCALE_HEIGHT = 1.0f;
const float MAX_ROLL = 85.0f;
private bool lastFrameEmulationActivated = false;
private Vector3 recordedHeadPoseRelativeOffsetTranslation;
private Vector3 recordedHeadPoseRelativeOffsetRotation;
private bool hasSentEvent = false;
// Use this for initialization
void Start () {
Cursor.lockState = CursorLockMode.None;
manager = OVRManager.instance;
recordedHeadPoseRelativeOffsetTranslation = manager.headPoseRelativeOffsetTranslation;
recordedHeadPoseRelativeOffsetRotation = manager.headPoseRelativeOffsetRotation;
}
// Update is called once per frame
void Update () {
bool emulationActivated = IsEmulationActivated();
if (emulationActivated)
{
Cursor.lockState = CursorLockMode.Locked;
if (!lastFrameEmulationActivated && resetHmdPoseOnRelease)
{
manager.headPoseRelativeOffsetTranslation = recordedHeadPoseRelativeOffsetTranslation;
manager.headPoseRelativeOffsetRotation = recordedHeadPoseRelativeOffsetRotation;
}
if (resetHmdPoseByMiddleMouseButton && Input.GetMouseButton(2))
{
manager.headPoseRelativeOffsetTranslation = Vector3.zero;
manager.headPoseRelativeOffsetRotation = Vector3.zero;
}
else
{
Vector3 emulatedTranslation = manager.headPoseRelativeOffsetTranslation;
float deltaMouseScrollWheel = Input.GetAxis("Mouse ScrollWheel");
float emulatedHeight = deltaMouseScrollWheel * MOUSE_SCALE_HEIGHT;
emulatedTranslation.y += emulatedHeight;
manager.headPoseRelativeOffsetTranslation = emulatedTranslation;
float deltaX = Input.GetAxis("Mouse X");
float deltaY = Input.GetAxis("Mouse Y");
Vector3 emulatedAngles = manager.headPoseRelativeOffsetRotation;
float emulatedRoll = emulatedAngles.x;
float emulatedYaw = emulatedAngles.y;
float emulatedPitch = emulatedAngles.z;
if (IsTweakingPitch())
{
emulatedPitch += deltaX * MOUSE_SCALE_X_PITCH;
}
else
{
emulatedRoll += deltaY * MOUSE_SCALE_Y;
emulatedYaw += deltaX * MOUSE_SCALE_X;
}
manager.headPoseRelativeOffsetRotation = new Vector3(emulatedRoll, emulatedYaw, emulatedPitch);
}
if (!hasSentEvent)
{
OVRPlugin.SendEvent("headset_emulator", "activated");
hasSentEvent = true;
}
}
else
{
Cursor.lockState = CursorLockMode.None;
if (lastFrameEmulationActivated)
{
recordedHeadPoseRelativeOffsetTranslation = manager.headPoseRelativeOffsetTranslation;
recordedHeadPoseRelativeOffsetRotation = manager.headPoseRelativeOffsetRotation;
if (resetHmdPoseOnRelease)
{
manager.headPoseRelativeOffsetTranslation = Vector3.zero;
manager.headPoseRelativeOffsetRotation = Vector3.zero;
}
}
}
lastFrameEmulationActivated = emulationActivated;
}
bool IsEmulationActivated()
{
if (opMode == OpMode.Off)
{
return false;
}
else if (opMode == OpMode.EditorOnly && !Application.isEditor)
{
return false;
}
foreach (KeyCode key in activateKeys)
{
if (Input.GetKey(key))
return true;
}
return false;
}
bool IsTweakingPitch()
{
if (!IsEmulationActivated())
return false;
foreach (KeyCode key in pitchKeys)
{
if (Input.GetKey(key))
return true;
}
return false;
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 5178bc8574ce2bf4388e787a2e2af326
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,9 +1,9 @@
/************************************************************************************
Copyright : Copyright 2017 Oculus VR, LLC. All Rights reserved.
Copyright : Copyright (c) Facebook Technologies, LLC and its affiliates. All rights reserved.
Licensed under the Oculus VR Rift SDK License Version 3.4.1 (the "License");
you may not use the Oculus VR Rift SDK except in compliance with the License,
Licensed under the Oculus SDK License Version 3.4.1 (the "License");
you may not use the Oculus SDK except in compliance with the License,
which is provided at the time of installation or download, or which
otherwise accompanies this software in either electronic or hard copy form.
@@ -11,7 +11,7 @@ You may obtain a copy of the License at
https://developer.oculus.com/licenses/sdk-3.4.1
Unless required by applicable law or agreed to in writing, the Oculus VR SDK
Unless required by applicable law or agreed to in writing, the Oculus SDK
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
@@ -25,6 +25,14 @@ using System.Collections.Generic;
using System.Runtime.InteropServices;
using UnityEngine;
#if UNITY_2017_2_OR_NEWER
using InputTracking = UnityEngine.XR.InputTracking;
using Node = UnityEngine.XR.XRNode;
#else
using InputTracking = UnityEngine.VR.InputTracking;
using Node = UnityEngine.VR.VRNode;
#endif
/// <summary>
/// Provides a unified input system for Oculus controllers and gamepads.
/// </summary>
@@ -372,7 +380,7 @@ public static class OVRInput
double predictionSeconds = (double)fixedUpdateCount * Time.fixedDeltaTime / Mathf.Max(Time.timeScale, 1e-6f);
fixedUpdateCount++;
OVRPlugin.UpdateNodePhysicsPoses(0, predictionSeconds);
}
@@ -415,7 +423,7 @@ public static class OVRInput
}
/// <summary>
/// Gets the position of the given Controller local to its tracking space.
/// Gets the position of the given Controller relative to its local coordinate space.
/// Only supported for Oculus LTouch and RTouch controllers. Non-tracked controllers will return Vector3.zero.
/// </summary>
public static Vector3 GetLocalControllerPosition(OVRInput.Controller controllerType)
@@ -424,17 +432,17 @@ public static class OVRInput
{
case Controller.LTouch:
case Controller.LTrackedRemote:
return OVRPlugin.GetNodePose(OVRPlugin.Node.HandLeft, stepType).ToOVRPose().position;
case Controller.RTouch:
return InputTracking.GetLocalPosition(Node.LeftHand);
case Controller.RTouch:
case Controller.RTrackedRemote:
return OVRPlugin.GetNodePose(OVRPlugin.Node.HandRight, stepType).ToOVRPose().position;
default:
return InputTracking.GetLocalPosition(Node.RightHand);
default:
return Vector3.zero;
}
}
/// <summary>
/// Gets the linear velocity of the given Controller local to its tracking space.
/// Gets the linear velocity of the given Controller relative to its local coordinate space.
/// Only supported for Oculus LTouch and RTouch controllers. Non-tracked controllers will return Vector3.zero.
/// </summary>
public static Vector3 GetLocalControllerVelocity(OVRInput.Controller controllerType)
@@ -443,17 +451,17 @@ public static class OVRInput
{
case Controller.LTouch:
case Controller.LTrackedRemote:
return OVRPlugin.GetNodeVelocity(OVRPlugin.Node.HandLeft, stepType).FromFlippedZVector3f();
case Controller.RTouch:
return OVRNodeStateProperties.GetNodeStateProperty(Node.LeftHand, NodeStatePropertyType.Velocity, OVRPlugin.Node.HandLeft, stepType);
case Controller.RTouch:
case Controller.RTrackedRemote:
return OVRPlugin.GetNodeVelocity(OVRPlugin.Node.HandRight, stepType).FromFlippedZVector3f();
default:
return OVRNodeStateProperties.GetNodeStateProperty(Node.RightHand, NodeStatePropertyType.Velocity, OVRPlugin.Node.HandRight, stepType);
default:
return Vector3.zero;
}
}
/// <summary>
/// Gets the linear acceleration of the given Controller local to its tracking space.
/// Gets the linear acceleration of the given Controller relative to its local coordinate space.
/// Only supported for Oculus LTouch and RTouch controllers. Non-tracked controllers will return Vector3.zero.
/// </summary>
public static Vector3 GetLocalControllerAcceleration(OVRInput.Controller controllerType)
@@ -462,17 +470,17 @@ public static class OVRInput
{
case Controller.LTouch:
case Controller.LTrackedRemote:
return OVRPlugin.GetNodeAcceleration(OVRPlugin.Node.HandLeft, stepType).FromFlippedZVector3f();
case Controller.RTouch:
return OVRNodeStateProperties.GetNodeStateProperty(Node.LeftHand, NodeStatePropertyType.Acceleration, OVRPlugin.Node.HandLeft, stepType);
case Controller.RTouch:
case Controller.RTrackedRemote:
return OVRPlugin.GetNodeAcceleration(OVRPlugin.Node.HandRight, stepType).FromFlippedZVector3f();
default:
return OVRNodeStateProperties.GetNodeStateProperty(Node.RightHand, NodeStatePropertyType.Acceleration, OVRPlugin.Node.HandRight, stepType);
default:
return Vector3.zero;
}
}
/// <summary>
/// Gets the rotation of the given Controller local to its tracking space.
/// Gets the rotation of the given Controller relative to its local coordinate space.
/// Only supported for Oculus LTouch and RTouch controllers. Non-tracked controllers will return Quaternion.identity.
/// </summary>
public static Quaternion GetLocalControllerRotation(OVRInput.Controller controllerType)
@@ -481,18 +489,18 @@ public static class OVRInput
{
case Controller.LTouch:
case Controller.LTrackedRemote:
return OVRPlugin.GetNodePose(OVRPlugin.Node.HandLeft, stepType).ToOVRPose().orientation;
case Controller.RTouch:
return InputTracking.GetLocalRotation(Node.LeftHand);
case Controller.RTouch:
case Controller.RTrackedRemote:
return OVRPlugin.GetNodePose(OVRPlugin.Node.HandRight, stepType).ToOVRPose().orientation;
default:
return InputTracking.GetLocalRotation(Node.RightHand);
default:
return Quaternion.identity;
}
}
/// <summary>
/// Gets the angular velocity of the given Controller local to its tracking space in radians per second around each axis.
/// Only supported for Oculus LTouch and RTouch controllers. Non-tracked controllers will return Quaternion.identity.
/// Gets the angular velocity of the given Controller relative to its local coordinate space in radians per second around each axis.
/// Only supported for Oculus LTouch and RTouch controllers. Non-tracked controllers will return Vector3.zero.
/// </summary>
public static Vector3 GetLocalControllerAngularVelocity(OVRInput.Controller controllerType)
{
@@ -500,18 +508,18 @@ public static class OVRInput
{
case Controller.LTouch:
case Controller.LTrackedRemote:
return OVRPlugin.GetNodeAngularVelocity(OVRPlugin.Node.HandLeft, stepType).FromFlippedZVector3f();
return OVRNodeStateProperties.GetNodeStateProperty(Node.LeftHand, NodeStatePropertyType.AngularVelocity, OVRPlugin.Node.HandLeft, stepType);
case Controller.RTouch:
case Controller.RTrackedRemote:
return OVRPlugin.GetNodeAngularVelocity(OVRPlugin.Node.HandRight, stepType).FromFlippedZVector3f();
return OVRNodeStateProperties.GetNodeStateProperty(Node.RightHand, NodeStatePropertyType.AngularVelocity, OVRPlugin.Node.HandRight, stepType);
default:
return Vector3.zero;
}
}
/// <summary>
/// Gets the angular acceleration of the given Controller local to its tracking space in radians per second per second around each axis.
/// Only supported for Oculus LTouch and RTouch controllers. Non-tracked controllers will return Quaternion.identity.
/// Gets the angular acceleration of the given Controller relative to its local coordinate space in radians per second per second around each axis.
/// Only supported for Oculus LTouch and RTouch controllers. Non-tracked controllers will return Vector3.zero.
/// </summary>
public static Vector3 GetLocalControllerAngularAcceleration(OVRInput.Controller controllerType)
{
@@ -519,10 +527,10 @@ public static class OVRInput
{
case Controller.LTouch:
case Controller.LTrackedRemote:
return OVRPlugin.GetNodeAngularAcceleration(OVRPlugin.Node.HandLeft, stepType).FromFlippedZVector3f();
return OVRNodeStateProperties.GetNodeStateProperty(Node.LeftHand, NodeStatePropertyType.AngularAcceleration, OVRPlugin.Node.HandLeft, stepType);
case Controller.RTouch:
case Controller.RTrackedRemote:
return OVRPlugin.GetNodeAngularAcceleration(OVRPlugin.Node.HandRight, stepType).FromFlippedZVector3f();
return OVRNodeStateProperties.GetNodeStateProperty(Node.RightHand, NodeStatePropertyType.AngularAcceleration, OVRPlugin.Node.HandRight, stepType);
default:
return Vector3.zero;
}
@@ -1118,7 +1126,7 @@ public static class OVRInput
{
return connectedControllerTypes;
}
/// <summary>
/// Returns true if the specified controller type is currently connected.
/// </summary>
@@ -1592,7 +1600,12 @@ public static class OVRInput
public virtual Controller Update()
{
OVRPlugin.ControllerState4 state = OVRPlugin.GetControllerState4((uint)controllerType);
OVRPlugin.ControllerState4 state;
if (!OVRPlugin.initialized && ( (controllerType & Controller.Touch) != 0) )
state = GetCrossPlatformState(controllerType);
else
state = OVRPlugin.GetControllerState4((uint)controllerType);
if (state.LIndexTrigger >= AXIS_AS_BUTTON_THRESHOLD)
state.Buttons |= (uint)RawButton.LIndexTrigger;
@@ -1626,6 +1639,39 @@ public static class OVRInput
return ((Controller)currentState.ConnectedControllers & controllerType);
}
private OVRPlugin.ControllerState4 GetCrossPlatformState(Controller controllerType)
{
OVRPlugin.ControllerState4 state = new OVRPlugin.ControllerState4();
if (controllerType == Controller.LTouch)
{
if (Input.GetButton("Oculus_CrossPlatform_Button4"))
state.Buttons |= (uint)RawButton.Y;
if (Input.GetButton("Oculus_CrossPlatform_PrimaryThumbstick"))
state.Buttons |= (uint)RawButton.LThumbstick;
state.LThumbstick.x = Input.GetAxis("Oculus_CrossPlatform_PrimaryThumbstickHorizontal");
state.LThumbstick.y = Input.GetAxis("Oculus_CrossPlatform_PrimaryThumbstickVertical");
state.LIndexTrigger = Input.GetAxis("Oculus_CrossPlatform_PrimaryIndexTrigger");
state.LHandTrigger = Input.GetAxis("Oculus_CrossPlatform_PrimaryHandTrigger");
}
else if (controllerType == Controller.RTouch)
{
if (Input.GetButton("Oculus_CrossPlatform_Button2"))
state.Buttons |= (uint)RawButton.B;
if (Input.GetButton("Oculus_CrossPlatform_SecondaryThumbstick"))
state.Buttons |= (uint)RawButton.RThumbstick;
state.RThumbstick.x = Input.GetAxis("Oculus_CrossPlatform_SecondaryThumbstickHorizontal");
state.RThumbstick.y = Input.GetAxis("Oculus_CrossPlatform_SecondaryThumbstickVertical");
state.RIndexTrigger = Input.GetAxis("Oculus_CrossPlatform_SecondaryIndexTrigger");
state.RHandTrigger = Input.GetAxis("Oculus_CrossPlatform_SecondaryHandTrigger");
}
return state;
}
public virtual void SetControllerVibration(float frequency, float amplitude)
{
OVRPlugin.SetControllerVibration((uint)controllerType, frequency, amplitude);

View File

@@ -1,7 +1,7 @@
fileFormatVersion: 2
guid: d210caf8a50e1954c80690fa858572ad
timeCreated: 1438295094
licenseType: Pro
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []

View File

@@ -1,7 +1,7 @@
fileFormatVersion: 2
guid: 701bfebb60063334f994e36546c103d6
timeCreated: 1499749327
licenseType: Pro
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []

View File

@@ -1,9 +1,9 @@
/************************************************************************************
Copyright : Copyright 2017 Oculus VR, LLC. All Rights reserved.
Copyright : Copyright (c) Facebook Technologies, LLC and its affiliates. All rights reserved.
Licensed under the Oculus VR Rift SDK License Version 3.4.1 (the "License");
you may not use the Oculus VR Rift SDK except in compliance with the License,
Licensed under the Oculus SDK License Version 3.4.1 (the "License");
you may not use the Oculus SDK except in compliance with the License,
which is provided at the time of installation or download, or which
otherwise accompanies this software in either electronic or hard copy form.
@@ -11,7 +11,7 @@ You may obtain a copy of the License at
https://developer.oculus.com/licenses/sdk-3.4.1
Unless required by applicable law or agreed to in writing, the Oculus VR SDK
Unless required by applicable law or agreed to in writing, the Oculus SDK
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
@@ -293,6 +293,24 @@ public class OVRLint : EditorWindow
}
#endif
#if UNITY_2017_3_OR_NEWER && !UNITY_ANDROID
if (!PlayerSettings.VROculus.dashSupport)
{
AddFix("Enable Dash Integration", "We recommend to enable Dash Integration for better user experience.", delegate (UnityEngine.Object obj, bool last, int selected)
{
PlayerSettings.VROculus.dashSupport = true;
}, null, "Fix");
}
if (!PlayerSettings.VROculus.sharedDepthBuffer)
{
AddFix("Enable Depth Buffer Sharing", "We recommend to enable Depth Buffer Sharing for better user experience on Oculus Dash.", delegate (UnityEngine.Object obj, bool last, int selected)
{
PlayerSettings.VROculus.sharedDepthBuffer = true;
}, null, "Fix");
}
#endif
BuildTargetGroup target = EditorUserBuildSettings.selectedBuildTargetGroup;
var tier = UnityEngine.Rendering.GraphicsTier.Tier1;
var tierSettings = UnityEditor.Rendering.EditorGraphicsSettings.GetTierSettings(target, tier);

View File

@@ -1,7 +1,7 @@
fileFormatVersion: 2
guid: f483b2ec6fdc344049771ed51034b4e4
timeCreated: 1484088598
licenseType: Free
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []

View File

@@ -1,9 +1,9 @@
/************************************************************************************
Copyright : Copyright 2017 Oculus VR, LLC. All Rights reserved.
Copyright : Copyright (c) Facebook Technologies, LLC and its affiliates. All rights reserved.
Licensed under the Oculus VR Rift SDK License Version 3.4.1 (the "License");
you may not use the Oculus VR Rift SDK except in compliance with the License,
Licensed under the Oculus SDK License Version 3.4.1 (the "License");
you may not use the Oculus SDK except in compliance with the License,
which is provided at the time of installation or download, or which
otherwise accompanies this software in either electronic or hard copy form.
@@ -11,7 +11,7 @@ You may obtain a copy of the License at
https://developer.oculus.com/licenses/sdk-3.4.1
Unless required by applicable law or agreed to in writing, the Oculus VR SDK
Unless required by applicable law or agreed to in writing, the Oculus SDK
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
@@ -174,7 +174,7 @@ public class OVRManager : MonoBehaviour
if (!_isHmdPresentCached)
{
_isHmdPresentCached = true;
_isHmdPresent = OVRPlugin.hmdPresent;
_isHmdPresent = OVRNodeStateProperties.IsHmdPresent();
}
return _isHmdPresent;
@@ -337,6 +337,60 @@ public class OVRManager : MonoBehaviour
[Tooltip("Max RenderScale the app can reach under adaptive resolution mode")]
public float maxRenderScale = 1.0f;
/// <summary>
/// Set the relative offset rotation of head poses
/// </summary>
[SerializeField]
[Tooltip("Set the relative offset rotation of head poses")]
private Vector3 _headPoseRelativeOffsetRotation;
public Vector3 headPoseRelativeOffsetRotation
{
get
{
return _headPoseRelativeOffsetRotation;
}
set
{
OVRPlugin.Quatf rotation;
OVRPlugin.Vector3f translation;
if (OVRPlugin.GetHeadPoseModifier(out rotation, out translation))
{
Quaternion finalRotation = Quaternion.Euler(value);
rotation = finalRotation.ToQuatf();
OVRPlugin.SetHeadPoseModifier(ref rotation, ref translation);
}
_headPoseRelativeOffsetRotation = value;
}
}
/// <summary>
/// Set the relative offset translation of head poses
/// </summary>
[SerializeField]
[Tooltip("Set the relative offset translation of head poses")]
private Vector3 _headPoseRelativeOffsetTranslation;
public Vector3 headPoseRelativeOffsetTranslation
{
get
{
return _headPoseRelativeOffsetTranslation;
}
set
{
OVRPlugin.Quatf rotation;
OVRPlugin.Vector3f translation;
if (OVRPlugin.GetHeadPoseModifier(out rotation, out translation))
{
if (translation.FromFlippedZVector3f() != value)
{
translation = value.ToFlippedZVector3f();
OVRPlugin.SetHeadPoseModifier(ref rotation, ref translation);
}
}
_headPoseRelativeOffsetTranslation = value;
}
}
#if UNITY_EDITOR_WIN || UNITY_STANDALONE_WIN
/// <summary>
/// If true, the MixedRealityCapture properties will be displayed
@@ -1102,7 +1156,7 @@ public class OVRManager : MonoBehaviour
if (OVRPlugin.shouldQuit)
Application.Quit();
if (AllowRecenter && OVRPlugin.shouldRecenter)
if (AllowRecenter && OVRPlugin.shouldRecenter)
{
OVRManager.display.RecenterPose();
}
@@ -1118,7 +1172,7 @@ public class OVRManager : MonoBehaviour
// Dispatch HMD events.
isHmdPresent = OVRPlugin.hmdPresent;
isHmdPresent = OVRNodeStateProperties.IsHmdPresent();
if (useRecommendedMSAALevel && QualitySettings.antiAliasing != display.recommendedMSAALevel)
{
@@ -1134,6 +1188,16 @@ public class OVRManager : MonoBehaviour
monoscopic = _monoscopic;
}
if (headPoseRelativeOffsetRotation != _headPoseRelativeOffsetRotation)
{
headPoseRelativeOffsetRotation = _headPoseRelativeOffsetRotation;
}
if (headPoseRelativeOffsetTranslation != _headPoseRelativeOffsetTranslation)
{
headPoseRelativeOffsetTranslation = _headPoseRelativeOffsetTranslation;
}
if (_wasHmdPresent && !isHmdPresent)
{
try

View File

@@ -1,9 +1,9 @@
/************************************************************************************
Copyright : Copyright 2017 Oculus VR, LLC. All Rights reserved.
Copyright : Copyright (c) Facebook Technologies, LLC and its affiliates. All rights reserved.
Licensed under the Oculus VR Rift SDK License Version 3.4.1 (the "License");
you may not use the Oculus VR Rift SDK except in compliance with the License,
Licensed under the Oculus SDK License Version 3.4.1 (the "License");
you may not use the Oculus SDK except in compliance with the License,
which is provided at the time of installation or download, or which
otherwise accompanies this software in either electronic or hard copy form.
@@ -11,7 +11,7 @@ You may obtain a copy of the License at
https://developer.oculus.com/licenses/sdk-3.4.1
Unless required by applicable law or agreed to in writing, the Oculus VR SDK
Unless required by applicable law or agreed to in writing, the Oculus SDK
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and

View File

@@ -1,7 +1,7 @@
fileFormatVersion: 2
guid: 5daf6258e951ab84bb8b3e3b03386396
timeCreated: 1497574405
licenseType: Pro
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []

View File

@@ -1,9 +1,9 @@
/************************************************************************************
Copyright : Copyright 2017 Oculus VR, LLC. All Rights reserved.
Copyright : Copyright (c) Facebook Technologies, LLC and its affiliates. All rights reserved.
Licensed under the Oculus VR Rift SDK License Version 3.4.1 (the "License");
you may not use the Oculus VR Rift SDK except in compliance with the License,
Licensed under the Oculus SDK License Version 3.4.1 (the "License");
you may not use the Oculus SDK except in compliance with the License,
which is provided at the time of installation or download, or which
otherwise accompanies this software in either electronic or hard copy form.
@@ -11,7 +11,7 @@ You may obtain a copy of the License at
https://developer.oculus.com/licenses/sdk-3.4.1
Unless required by applicable law or agreed to in writing, the Oculus VR SDK
Unless required by applicable law or agreed to in writing, the Oculus SDK
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and

View File

@@ -1,9 +1,9 @@
/************************************************************************************
Copyright : Copyright 2017 Oculus VR, LLC. All Rights reserved.
Copyright : Copyright (c) Facebook Technologies, LLC and its affiliates. All rights reserved.
Licensed under the Oculus VR Rift SDK License Version 3.4.1 (the "License");
you may not use the Oculus VR Rift SDK except in compliance with the License,
Licensed under the Oculus SDK License Version 3.4.1 (the "License");
you may not use the Oculus SDK except in compliance with the License,
which is provided at the time of installation or download, or which
otherwise accompanies this software in either electronic or hard copy form.
@@ -11,7 +11,7 @@ You may obtain a copy of the License at
https://developer.oculus.com/licenses/sdk-3.4.1
Unless required by applicable law or agreed to in writing, the Oculus VR SDK
Unless required by applicable law or agreed to in writing, the Oculus SDK
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
@@ -94,12 +94,36 @@ public class OVROverlay : MonoBehaviour
[Tooltip("If true, the layer would be used to present protected content (e.g. HDCP). The flag is effective only on PC.")]
public bool isProtectedContent = false;
/// <summary>
/// If true, the layer will be created as an external surface. externalSurfaceObject contains the Surface object. It's effective only on Android.
/// </summary>
[Tooltip("If true, the layer will be created as an external surface. externalSurfaceObject contains the Surface object. It's effective only on Android.")]
public bool isExternalSurface = false;
/// <summary>
/// The width which will be used to create the external surface. It's effective only on Android.
/// </summary>
[Tooltip("The width which will be used to create the external surface. It's effective only on Android.")]
public int externalSurfaceWidth = 0;
/// <summary>
/// The height which will be used to create the external surface. It's effective only on Android.
/// </summary>
[Tooltip("The height which will be used to create the external surface. It's effective only on Android.")]
public int externalSurfaceHeight = 0;
/// <summary>
/// The compositionDepth defines the order of the OVROverlays in composition. The overlay/underlay with smaller compositionDepth would be composited in the front of the overlay/underlay with larger compositionDepth.
/// </summary>
[Tooltip("The compositionDepth defines the order of the OVROverlays in composition. The overlay/underlay with smaller compositionDepth would be composited in the front of the overlay/underlay with larger compositionDepth.")]
public int compositionDepth = 0;
/// <summary>
/// The noDepthBufferTesting will stop layer's depth buffer compositing even if the engine has "Depth buffer sharing" enabled on Rift.
/// </summary>
[Tooltip("The noDepthBufferTesting will stop layer's depth buffer compositing even if the engine has \"Shared Depth Buffer\" enabled")]
public bool noDepthBufferTesting = false;
/// <summary>
/// Specify overlay's shape
/// </summary>
@@ -116,6 +140,17 @@ public class OVROverlay : MonoBehaviour
protected IntPtr[] texturePtrs = new IntPtr[] { IntPtr.Zero, IntPtr.Zero };
/// <summary>
/// The Surface object (Android only).
/// </summary>
public System.IntPtr externalSurfaceObject;
public delegate void ExternalSurfaceObjectCreated();
/// <summary>
/// Will be triggered after externalSurfaceTextueObject get created.
/// </summary>
public ExternalSurfaceObjectCreated externalSurfaceObjectCreated;
/// <summary>
/// Use this function to set texture and texNativePtr when app is running
/// GetNativeTexturePtr is a slow behavior, the value should be pre-cached
@@ -226,7 +261,14 @@ public class OVROverlay : MonoBehaviour
if (layerId > 0)
{
layerDesc = desc;
stageCount = OVRPlugin.GetLayerTextureStageCount(layerId);
if (isExternalSurface)
{
stageCount = 1;
}
else
{
stageCount = OVRPlugin.GetLayerTextureStageCount(layerId);
}
}
isOverridePending = false;
@@ -236,6 +278,23 @@ public class OVROverlay : MonoBehaviour
private bool CreateLayerTextures(bool useMipmaps, OVRPlugin.Sizei size, bool isHdr)
{
if (isExternalSurface)
{
if (externalSurfaceObject == System.IntPtr.Zero)
{
externalSurfaceObject = OVRPlugin.GetLayerAndroidSurfaceObject(layerId);
if (externalSurfaceObject != System.IntPtr.Zero)
{
Debug.LogFormat("GetLayerAndroidSurfaceObject returns {0}", externalSurfaceObject);
if (externalSurfaceObjectCreated != null)
{
externalSurfaceObjectCreated();
}
}
}
return false;
}
bool needsCopy = false;
if (stageCount <= 0)
@@ -289,6 +348,11 @@ public class OVROverlay : MonoBehaviour
private void DestroyLayerTextures()
{
if (isExternalSurface)
{
return;
}
for (int eyeId = 0; layerTextures != null && eyeId < texturesPerStage; ++eyeId)
{
if (layerTextures[eyeId].swapChain != null)
@@ -306,7 +370,7 @@ public class OVROverlay : MonoBehaviour
if (layerIndex != -1)
{
// Turn off the overlay if it was on.
OVRPlugin.EnqueueSubmitLayer(true, false, IntPtr.Zero, IntPtr.Zero, -1, 0, OVRPose.identity.ToPosef(), Vector3.one.ToVector3f(), layerIndex, (OVRPlugin.OverlayShape)prevOverlayShape);
OVRPlugin.EnqueueSubmitLayer(true, false, false, IntPtr.Zero, IntPtr.Zero, -1, 0, OVRPose.identity.ToPosef(), Vector3.one.ToVector3f(), layerIndex, (OVRPlugin.OverlayShape)prevOverlayShape);
instances[layerIndex] = null;
layerIndex = -1;
}
@@ -327,6 +391,11 @@ public class OVROverlay : MonoBehaviour
private bool LatchLayerTextures()
{
if (isExternalSurface)
{
return true;
}
for (int i = 0; i < texturesPerStage; ++i)
{
if (textures[i] != layerTextures[i].appTexture || layerTextures[i].appTexturePtr == IntPtr.Zero)
@@ -379,14 +448,31 @@ public class OVROverlay : MonoBehaviour
private OVRPlugin.LayerDesc GetCurrentLayerDesc()
{
OVRPlugin.Sizei textureSize = new OVRPlugin.Sizei() { w = 0, h = 0 };
if (isExternalSurface)
{
textureSize.w = externalSurfaceWidth;
textureSize.h = externalSurfaceHeight;
}
else
{
if (textures[0] == null)
{
Debug.LogWarning("textures[0] hasn't been set");
}
textureSize.w = textures[0] ? textures[0].width : 0;
textureSize.h = textures[0] ? textures[0].height : 0;
}
OVRPlugin.LayerDesc newDesc = new OVRPlugin.LayerDesc() {
Format = OVRPlugin.EyeTextureFormat.R8G8B8A8_sRGB,
LayerFlags = (int)OVRPlugin.LayerFlags.TextureOriginAtBottomLeft,
LayerFlags = isExternalSurface ? 0 : (int)OVRPlugin.LayerFlags.TextureOriginAtBottomLeft,
Layout = layout,
MipLevels = 1,
SampleCount = 1,
Shape = (OVRPlugin.OverlayShape)currentOverlayShape,
TextureSize = new OVRPlugin.Sizei() { w = textures[0].width, h = textures[0].height }
TextureSize = textureSize
};
var tex2D = textures[0] as Texture2D;
@@ -421,11 +507,21 @@ public class OVROverlay : MonoBehaviour
newDesc.LayerFlags |= (int)OVRPlugin.LayerFlags.ProtectedContent;
}
if (isExternalSurface)
{
newDesc.LayerFlags |= (int)OVRPlugin.LayerFlags.AndroidSurfaceSwapChain;
}
return newDesc;
}
private bool PopulateLayer(int mipLevels, bool isHdr, OVRPlugin.Sizei size, int sampleCount, int stage)
{
if (isExternalSurface)
{
return true;
}
bool ret = false;
RenderTextureFormat rtFormat = (isHdr) ? RenderTextureFormat.ARGBHalf : RenderTextureFormat.ARGB32;
@@ -508,10 +604,13 @@ public class OVROverlay : MonoBehaviour
return ret;
}
private bool SubmitLayer(bool overlay, bool headLocked, OVRPose pose, Vector3 scale, int frameIndex)
private bool SubmitLayer(bool overlay, bool headLocked, bool noDepthBufferTesting, OVRPose pose, Vector3 scale, int frameIndex)
{
int rightEyeIndex = (texturesPerStage >= 2) ? 1 : 0;
bool isOverlayVisible = OVRPlugin.EnqueueSubmitLayer(overlay, headLocked, layerTextures[0].appTexturePtr, layerTextures[rightEyeIndex].appTexturePtr, layerId, frameIndex, pose.flipZ().ToPosef(), scale.ToVector3f(), layerIndex, (OVRPlugin.OverlayShape)currentOverlayShape);
bool isOverlayVisible = OVRPlugin.EnqueueSubmitLayer(overlay, headLocked, noDepthBufferTesting,
isExternalSurface ? System.IntPtr.Zero : layerTextures[0].appTexturePtr,
isExternalSurface ? System.IntPtr.Zero : layerTextures[rightEyeIndex].appTexturePtr,
layerId, frameIndex, pose.flipZ().ToPosef(), scale.ToVector3f(), layerIndex, (OVRPlugin.OverlayShape)currentOverlayShape);
prevOverlayShape = currentOverlayShape;
@@ -617,7 +716,7 @@ public class OVROverlay : MonoBehaviour
// The overlay must be specified every eye frame, because it is positioned relative to the
// current head location. If frames are dropped, it will be time warped appropriately,
// just like the eye buffers.
if (currentOverlayType == OverlayType.None || textures.Length < texturesPerStage || textures[0] == null)
if (currentOverlayType == OverlayType.None || ((textures.Length < texturesPerStage || textures[0] == null) && !isExternalSurface))
return;
OVRPose pose = OVRPose.identity;
@@ -639,7 +738,7 @@ public class OVROverlay : MonoBehaviour
createdLayer |= CreateLayerTextures(useMipmaps, newDesc.TextureSize, isHdr);
if (layerTextures[0].appTexture as RenderTexture != null)
if (!isExternalSurface && (layerTextures[0].appTexture as RenderTexture != null))
isDynamic = true;
if (!LatchLayerTextures())
@@ -653,7 +752,7 @@ public class OVROverlay : MonoBehaviour
return;
}
bool isOverlayVisible = SubmitLayer(overlay, headLocked, pose, scale, frameIndex);
bool isOverlayVisible = SubmitLayer(overlay, headLocked, noDepthBufferTesting, pose, scale, frameIndex);
prevFrameIndex = frameIndex;
if (isDynamic)

View File

@@ -1,9 +1,9 @@
/************************************************************************************
Copyright : Copyright 2017 Oculus VR, LLC. All Rights reserved.
Copyright : Copyright (c) Facebook Technologies, LLC and its affiliates. All rights reserved.
Licensed under the Oculus VR Rift SDK License Version 3.4.1 (the "License");
you may not use the Oculus VR Rift SDK except in compliance with the License,
Licensed under the Oculus SDK License Version 3.4.1 (the "License");
you may not use the Oculus SDK except in compliance with the License,
which is provided at the time of installation or download, or which
otherwise accompanies this software in either electronic or hard copy form.
@@ -11,7 +11,7 @@ You may obtain a copy of the License at
https://developer.oculus.com/licenses/sdk-3.4.1
Unless required by applicable law or agreed to in writing, the Oculus VR SDK
Unless required by applicable law or agreed to in writing, the Oculus SDK
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and

View File

@@ -1,9 +1,9 @@
/************************************************************************************
Copyright : Copyright 2017 Oculus VR, LLC. All Rights reserved.
Copyright : Copyright (c) Facebook Technologies, LLC and its affiliates. All rights reserved.
Licensed under the Oculus VR Rift SDK License Version 3.4.1 (the "License");
you may not use the Oculus VR Rift SDK except in compliance with the License,
Licensed under the Oculus SDK License Version 3.4.1 (the "License");
you may not use the Oculus SDK except in compliance with the License,
which is provided at the time of installation or download, or which
otherwise accompanies this software in either electronic or hard copy form.
@@ -11,7 +11,7 @@ You may obtain a copy of the License at
https://developer.oculus.com/licenses/sdk-3.4.1
Unless required by applicable law or agreed to in writing, the Oculus VR SDK
Unless required by applicable law or agreed to in writing, the Oculus SDK
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
@@ -40,7 +40,7 @@ public static class OVRPlugin
#if OVRPLUGIN_UNSUPPORTED_PLATFORM
public static readonly System.Version wrapperVersion = _versionZero;
#else
public static readonly System.Version wrapperVersion = OVRP_1_28_0.version;
public static readonly System.Version wrapperVersion = OVRP_1_30_0.version;
#endif
private static System.Version _version;
@@ -343,6 +343,25 @@ public static class OVRPlugin
EnumSize = 0x7FFFFFFF
}
public enum PerfMetrics
{
App_CpuTime_Float = 0,
App_GpuTime_Float,
App_MotionToPhotonLatencyTime_Float,
Compositor_CpuTime_Float,
Compositor_GpuTime_Float,
Compositor_DroppedFrameCount_Int,
Compositor_LatencyTime_Float,
System_GpuUtilPercentage_Float,
System_CpuUtilAveragePercentage_Float,
System_CpuUtilWorstPercentage_Float,
Count,
EnumSize = 0x7FFFFFFF
}
[StructLayout(LayoutKind.Sequential)]
public struct CameraDeviceIntrinsicsParameters
{
@@ -368,6 +387,7 @@ public static class OVRPlugin
None = unchecked((int)0x00000000),
OnTop = unchecked((int)0x00000001),
HeadLocked = unchecked((int)0x00000002),
NoDepth = unchecked((int)0x00000004),
// Using the 5-8 bits for shapes, total 16 potential shapes can be supported 0x000000[0]0 -> 0x000000[F]0
ShapeFlag_Quad = unchecked((int)OverlayShape.Quad << OverlayShapeFlagShift),
@@ -432,6 +452,15 @@ public static class OVRPlugin
public Vector3f AngularVelocity;
public Vector3f AngularAcceleration;
double Time;
public static readonly PoseStatef identity = new PoseStatef
{
Pose = Posef.identity,
Velocity = Vector3f.zero,
Acceleration = Vector3f.zero,
AngularVelocity = Vector3f.zero,
AngularAcceleration = Vector3f.zero
};
}
[StructLayout(LayoutKind.Sequential)]
@@ -772,6 +801,7 @@ public static class OVRPlugin
ChromaticAberrationCorrection = (1 << 4),
NoAllocation = (1 << 5),
ProtectedContent = (1 << 6),
AndroidSurfaceSwapChain = (1 << 7),
}
[StructLayout(LayoutKind.Sequential)]
@@ -1206,10 +1236,13 @@ public static class OVRPlugin
public static string latency
{
get {
get {
#if OVRPLUGIN_UNSUPPORTED_PLATFORM
return string.Empty;
#else
if (!initialized)
return string.Empty;
return OVRP_1_1_0.ovrp_GetAppLatencyTimings();
#endif
}
@@ -1221,6 +1254,9 @@ public static class OVRPlugin
#if OVRPLUGIN_UNSUPPORTED_PLATFORM
return 0.0f;
#else
if (!initialized)
return 0.0f;
return OVRP_1_1_0.ovrp_GetUserEyeDepth();
#endif
}
@@ -1362,13 +1398,16 @@ public static class OVRPlugin
#if OVRPLUGIN_UNSUPPORTED_PLATFORM
return false;
#else
return OVRP_1_3_0.ovrp_GetEyeOcclusionMeshEnabled() == Bool.True;
return initialized && (OVRP_1_3_0.ovrp_GetEyeOcclusionMeshEnabled() == Bool.True);
#endif
}
set {
#if OVRPLUGIN_UNSUPPORTED_PLATFORM
return;
#else
if (!initialized)
return;
OVRP_1_3_0.ovrp_SetEyeOcclusionMeshEnabled(ToBool(value));
#endif
}
@@ -1430,7 +1469,7 @@ public static class OVRPlugin
#endif
}
public static bool EnqueueSubmitLayer(bool onTop, bool headLocked, IntPtr leftTexture, IntPtr rightTexture, int layerId, int frameIndex, Posef pose, Vector3f scale, int layerIndex=0, OverlayShape shape=OverlayShape.Quad)
public static bool EnqueueSubmitLayer(bool onTop, bool headLocked, bool noDepthBufferTesting, IntPtr leftTexture, IntPtr rightTexture, int layerId, int frameIndex, Posef pose, Vector3f scale, int layerIndex=0, OverlayShape shape=OverlayShape.Quad)
{
#if OVRPLUGIN_UNSUPPORTED_PLATFORM
return false;
@@ -1442,6 +1481,8 @@ public static class OVRPlugin
flags |= (uint)OverlayFlag.OnTop;
if (headLocked)
flags |= (uint)OverlayFlag.HeadLocked;
if (noDepthBufferTesting)
flags |= (uint)OverlayFlag.NoDepth;
if (shape == OverlayShape.Cylinder || shape == OverlayShape.Cubemap)
{
@@ -1570,6 +1611,20 @@ public static class OVRPlugin
#endif
}
public static IntPtr GetLayerAndroidSurfaceObject(int layerId)
{
#if OVRPLUGIN_UNSUPPORTED_PLATFORM
return IntPtr.Zero;
#else
IntPtr surfaceObject = IntPtr.Zero;
if (version >= OVRP_1_29_0.version)
OVRP_1_29_0.ovrp_GetLayerAndroidSurfaceObject(layerId, ref surfaceObject);
return surfaceObject;
#endif
}
public static bool UpdateNodePhysicsPoses(int frameIndex, double predictionSeconds)
{
#if OVRPLUGIN_UNSUPPORTED_PLATFORM
@@ -1678,6 +1733,81 @@ public static class OVRPlugin
#endif
}
public static PoseStatef GetNodePoseStateRaw(Node nodeId, Step stepId)
{
#if OVRPLUGIN_UNSUPPORTED_PLATFORM
return PoseStatef.identity;
#else
if (version >= OVRP_1_29_0.version)
{
PoseStatef nodePoseState;
Result result = OVRP_1_29_0.ovrp_GetNodePoseStateRaw(stepId, -1, nodeId, out nodePoseState);
if (result == Result.Success)
{
return nodePoseState;
}
else
{
return PoseStatef.identity;
}
}
if (version >= OVRP_1_12_0.version)
return OVRP_1_12_0.ovrp_GetNodePoseState(stepId, nodeId);
else
return PoseStatef.identity;
#endif
}
public static Posef GetCurrentTrackingTransformPose()
{
#if OVRPLUGIN_UNSUPPORTED_PLATFORM
return Posef.identity;
#else
if (version >= OVRP_1_30_0.version)
{
Posef trackingTransformPose;
Result result = OVRP_1_30_0.ovrp_GetCurrentTrackingTransformPose(out trackingTransformPose);
if (result == Result.Success)
{
return trackingTransformPose;
}
else
{
return Posef.identity;
}
}
else
{
return Posef.identity;
}
#endif
}
public static Posef GetTrackingTransformRawPose()
{
#if OVRPLUGIN_UNSUPPORTED_PLATFORM
return Posef.identity;
#else
if (version >= OVRP_1_30_0.version)
{
Posef trackingTransforRawPose;
Result result = OVRP_1_30_0.ovrp_GetTrackingTransformRawPose(out trackingTransforRawPose);
if (result == Result.Success)
{
return trackingTransforRawPose;
}
else
{
return Posef.identity;
}
}
else
{
return Posef.identity;
}
#endif
}
public static ControllerState GetControllerState(uint controllerMask)
{
#if OVRPLUGIN_UNSUPPORTED_PLATFORM
@@ -3003,12 +3133,16 @@ public static class OVRPlugin
#endif
}
public static bool SendEvent(string name, string param = "")
public static bool SendEvent(string name, string param = "", string source = "")
{
#if OVRPLUGIN_UNSUPPORTED_PLATFORM
return false;
#else
if (version >= OVRP_1_28_0.version)
if (version >= OVRP_1_30_0.version)
{
return OVRP_1_30_0.ovrp_SendEvent2(name, param, source.Length == 0 ? "integration": source) == Result.Success;
}
else if (version >= OVRP_1_28_0.version)
{
return OVRP_1_28_0.ovrp_SendEvent(name, param) == Result.Success;
}
@@ -3019,6 +3153,117 @@ public static class OVRPlugin
#endif
}
public static bool SetHeadPoseModifier(ref Quatf relativeRotation, ref Vector3f relativeTranslation)
{
#if OVRPLUGIN_UNSUPPORTED_PLATFORM
return false;
#else
if (version >= OVRP_1_29_0.version)
{
return OVRP_1_29_0.ovrp_SetHeadPoseModifier(ref relativeRotation, ref relativeTranslation) == Result.Success;
}
else
{
return false;
}
#endif
}
public static bool GetHeadPoseModifier(out Quatf relativeRotation, out Vector3f relativeTranslation)
{
#if OVRPLUGIN_UNSUPPORTED_PLATFORM
relativeRotation = Quatf.identity;
relativeTranslation = Vector3f.zero;
return false;
#else
if (version >= OVRP_1_29_0.version)
{
return OVRP_1_29_0.ovrp_GetHeadPoseModifier(out relativeRotation, out relativeTranslation) == Result.Success;
}
else
{
relativeRotation = Quatf.identity;
relativeTranslation = Vector3f.zero;
return false;
}
#endif
}
public static bool IsPerfMetricsSupported(PerfMetrics perfMetrics)
{
#if OVRPLUGIN_UNSUPPORTED_PLATFORM
return false;
#else
if (version >= OVRP_1_30_0.version)
{
Bool isSupported;
Result result = OVRP_1_30_0.ovrp_IsPerfMetricsSupported(perfMetrics, out isSupported);
if (result == Result.Success)
{
return isSupported == Bool.True;
}
else
{
return false;
}
}
else
{
return false;
}
#endif
}
public static float? GetPerfMetricsFloat(PerfMetrics perfMetrics)
{
#if OVRPLUGIN_UNSUPPORTED_PLATFORM
return null;
#else
if (version >= OVRP_1_30_0.version)
{
float value;
Result result = OVRP_1_30_0.ovrp_GetPerfMetricsFloat(perfMetrics, out value);
if (result == Result.Success)
{
return value;
}
else
{
return null;
}
}
else
{
return null;
}
#endif
}
public static int? GetPerfMetricsInt(PerfMetrics perfMetrics)
{
#if OVRPLUGIN_UNSUPPORTED_PLATFORM
return null;
#else
if (version >= OVRP_1_30_0.version)
{
int value;
Result result = OVRP_1_30_0.ovrp_GetPerfMetricsInt(perfMetrics, out value);
if (result == Result.Success)
{
return value;
}
else
{
return null;
}
}
else
{
return null;
}
#endif
}
private const string pluginName = "OVRPlugin";
private static System.Version _versionZero = new System.Version(0, 0, 0);
@@ -3606,6 +3851,46 @@ public static class OVRPlugin
public static extern Result ovrp_EnqueueSetupLayer2(ref LayerDesc desc, int compositionDepth, IntPtr layerId);
}
private static class OVRP_1_29_0
{
public static readonly System.Version version = new System.Version(1, 29, 0);
[DllImport(pluginName, CallingConvention = CallingConvention.Cdecl)]
public static extern Result ovrp_GetLayerAndroidSurfaceObject(int layerId, ref IntPtr surfaceObject);
[DllImport(pluginName, CallingConvention = CallingConvention.Cdecl)]
public static extern Result ovrp_SetHeadPoseModifier(ref Quatf relativeRotation, ref Vector3f relativeTranslation);
[DllImport(pluginName, CallingConvention = CallingConvention.Cdecl)]
public static extern Result ovrp_GetHeadPoseModifier(out Quatf relativeRotation, out Vector3f relativeTranslation);
[DllImport(pluginName, CallingConvention = CallingConvention.Cdecl)]
public static extern Result ovrp_GetNodePoseStateRaw(Step stepId, int frameIndex, Node nodeId, out PoseStatef nodePoseState);
}
private static class OVRP_1_30_0
{
public static readonly System.Version version = new System.Version(1, 30, 0);
[DllImport(pluginName, CallingConvention = CallingConvention.Cdecl)]
public static extern Result ovrp_GetCurrentTrackingTransformPose(out Posef trackingTransformPose);
[DllImport(pluginName, CallingConvention = CallingConvention.Cdecl)]
public static extern Result ovrp_GetTrackingTransformRawPose(out Posef trackingTransformRawPose);
[DllImport(pluginName, CallingConvention = CallingConvention.Cdecl)]
public static extern Result ovrp_SendEvent2(string name, string param, string source);
[DllImport(pluginName, CallingConvention = CallingConvention.Cdecl)]
public static extern Result ovrp_IsPerfMetricsSupported(PerfMetrics perfMetrics, out Bool isSupported);
[DllImport(pluginName, CallingConvention = CallingConvention.Cdecl)]
public static extern Result ovrp_GetPerfMetricsFloat(PerfMetrics perfMetrics, out float value);
[DllImport(pluginName, CallingConvention = CallingConvention.Cdecl)]
public static extern Result ovrp_GetPerfMetricsInt(PerfMetrics perfMetrics, out int value);
}
#endif // !OVRPLUGIN_UNSUPPORTED_PLATFORM
}

View File

@@ -1,9 +1,9 @@
/************************************************************************************
Copyright : Copyright 2017 Oculus VR, LLC. All Rights reserved.
Copyright : Copyright (c) Facebook Technologies, LLC and its affiliates. All rights reserved.
Licensed under the Oculus VR Rift SDK License Version 3.4.1 (the "License");
you may not use the Oculus VR Rift SDK except in compliance with the License,
Licensed under the Oculus SDK License Version 3.4.1 (the "License");
you may not use the Oculus SDK except in compliance with the License,
which is provided at the time of installation or download, or which
otherwise accompanies this software in either electronic or hard copy form.
@@ -11,7 +11,7 @@ You may obtain a copy of the License at
https://developer.oculus.com/licenses/sdk-3.4.1
Unless required by applicable law or agreed to in writing, the Oculus VR SDK
Unless required by applicable law or agreed to in writing, the Oculus SDK
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and

View File

@@ -1,9 +1,9 @@
/************************************************************************************
Copyright : Copyright 2017 Oculus VR, LLC. All Rights reserved.
Copyright : Copyright (c) Facebook Technologies, LLC and its affiliates. All rights reserved.
Licensed under the Oculus VR Rift SDK License Version 3.4.1 (the "License");
you may not use the Oculus VR Rift SDK except in compliance with the License,
Licensed under the Oculus SDK License Version 3.4.1 (the "License");
you may not use the Oculus SDK except in compliance with the License,
which is provided at the time of installation or download, or which
otherwise accompanies this software in either electronic or hard copy form.
@@ -11,7 +11,7 @@ You may obtain a copy of the License at
https://developer.oculus.com/licenses/sdk-3.4.1
Unless required by applicable law or agreed to in writing, the Oculus VR SDK
Unless required by applicable law or agreed to in writing, the Oculus SDK
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and

View File

@@ -1,9 +1,9 @@
/************************************************************************************
Copyright : Copyright 2017 Oculus VR, LLC. All Rights reserved.
Copyright : Copyright (c) Facebook Technologies, LLC and its affiliates. All rights reserved.
Licensed under the Oculus VR Rift SDK License Version 3.4.1 (the "License");
you may not use the Oculus VR Rift SDK except in compliance with the License,
Licensed under the Oculus SDK License Version 3.4.1 (the "License");
you may not use the Oculus SDK except in compliance with the License,
which is provided at the time of installation or download, or which
otherwise accompanies this software in either electronic or hard copy form.
@@ -11,7 +11,7 @@ You may obtain a copy of the License at
https://developer.oculus.com/licenses/sdk-3.4.1
Unless required by applicable law or agreed to in writing, the Oculus VR SDK
Unless required by applicable law or agreed to in writing, the Oculus SDK
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and

View File

@@ -1,7 +1,7 @@
fileFormatVersion: 2
guid: 7a489178b0acf0147846b3873447beaf
timeCreated: 1464728890
licenseType: Pro
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []

View File

@@ -1,9 +1,9 @@
/************************************************************************************
Copyright : Copyright 2017 Oculus VR, LLC. All Rights reserved.
Copyright : Copyright (c) Facebook Technologies, LLC and its affiliates. All rights reserved.
Licensed under the Oculus VR Rift SDK License Version 3.4.1 (the "License");
you may not use the Oculus VR Rift SDK except in compliance with the License,
Licensed under the Oculus SDK License Version 3.4.1 (the "License");
you may not use the Oculus SDK except in compliance with the License,
which is provided at the time of installation or download, or which
otherwise accompanies this software in either electronic or hard copy form.
@@ -11,7 +11,7 @@ You may obtain a copy of the License at
https://developer.oculus.com/licenses/sdk-3.4.1
Unless required by applicable law or agreed to in writing, the Oculus VR SDK
Unless required by applicable law or agreed to in writing, the Oculus SDK
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and

View File

@@ -1,9 +1,9 @@
/************************************************************************************
Copyright : Copyright 2017 Oculus VR, LLC. All Rights reserved.
Copyright : Copyright (c) Facebook Technologies, LLC and its affiliates. All rights reserved.
Licensed under the Oculus VR Rift SDK License Version 3.4.1 (the "License");
you may not use the Oculus VR Rift SDK except in compliance with the License,
Licensed under the Oculus SDK License Version 3.4.1 (the "License");
you may not use the Oculus SDK except in compliance with the License,
which is provided at the time of installation or download, or which
otherwise accompanies this software in either electronic or hard copy form.
@@ -12,7 +12,7 @@ You may obtain a copy of the License at
https://developer.oculus.com/licenses/sdk-3.4.1
Unless required by applicable law or agreed to in writing, the Oculus VR SDK
Unless required by applicable law or agreed to in writing, the Oculus SDK
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and

View File

@@ -1,9 +1,9 @@
/************************************************************************************
Copyright : Copyright 2017 Oculus VR, LLC. All Rights reserved.
Copyright : Copyright (c) Facebook Technologies, LLC and its affiliates. All rights reserved.
Licensed under the Oculus VR Rift SDK License Version 3.4.1 (the "License");
you may not use the Oculus VR Rift SDK except in compliance with the License,
Licensed under the Oculus SDK License Version 3.4.1 (the "License");
you may not use the Oculus SDK except in compliance with the License,
which is provided at the time of installation or download, or which
otherwise accompanies this software in either electronic or hard copy form.
@@ -11,7 +11,7 @@ You may obtain a copy of the License at
https://developer.oculus.com/licenses/sdk-3.4.1
Unless required by applicable law or agreed to in writing, the Oculus VR SDK
Unless required by applicable law or agreed to in writing, the Oculus SDK
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and

View File

@@ -1,7 +1,7 @@
fileFormatVersion: 2
guid: 7acc4619d4cb5e64e9ed05e5a7a8099f
timeCreated: 1486173066
licenseType: Free
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []

View File

@@ -1,9 +1,9 @@
/************************************************************************************
Copyright : Copyright 2017 Oculus VR, LLC. All Rights reserved.
Copyright : Copyright (c) Facebook Technologies, LLC and its affiliates. All rights reserved.
Licensed under the Oculus VR Rift SDK License Version 3.4.1 (the "License");
you may not use the Oculus VR Rift SDK except in compliance with the License,
Licensed under the Oculus SDK License Version 3.4.1 (the "License");
you may not use the Oculus SDK except in compliance with the License,
which is provided at the time of installation or download, or which
otherwise accompanies this software in either electronic or hard copy form.
@@ -11,7 +11,7 @@ You may obtain a copy of the License at
https://developer.oculus.com/licenses/sdk-3.4.1
Unless required by applicable law or agreed to in writing, the Oculus VR SDK
Unless required by applicable law or agreed to in writing, the Oculus SDK
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and

View File

@@ -1,7 +1,7 @@
fileFormatVersion: 2
guid: 02d61468f8b77ae4b92c344bc9a600fb
timeCreated: 1481833527
licenseType: Pro
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []

View File

@@ -1,9 +1,9 @@
/************************************************************************************
Copyright : Copyright 2017 Oculus VR, LLC. All Rights reserved.
Copyright : Copyright (c) Facebook Technologies, LLC and its affiliates. All rights reserved.
Licensed under the Oculus VR Rift SDK License Version 3.4.1 (the "License");
you may not use the Oculus VR Rift SDK except in compliance with the License,
Licensed under the Oculus SDK License Version 3.4.1 (the "License");
you may not use the Oculus SDK except in compliance with the License,
which is provided at the time of installation or download, or which
otherwise accompanies this software in either electronic or hard copy form.
@@ -11,7 +11,7 @@ You may obtain a copy of the License at
https://developer.oculus.com/licenses/sdk-3.4.1
Unless required by applicable law or agreed to in writing, the Oculus VR SDK
Unless required by applicable law or agreed to in writing, the Oculus SDK
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and

View File

@@ -1,7 +1,7 @@
fileFormatVersion: 2
guid: fd425c2d06f39bf4899d07c05d0f10eb
timeCreated: 1481832436
licenseType: Pro
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []

View File

@@ -1,9 +1,9 @@
/************************************************************************************
Copyright : Copyright 2017 Oculus VR, LLC. All Rights reserved.
Copyright : Copyright (c) Facebook Technologies, LLC and its affiliates. All rights reserved.
Licensed under the Oculus VR Rift SDK License Version 3.4.1 (the "License");
you may not use the Oculus VR Rift SDK except in compliance with the License,
Licensed under the Oculus SDK License Version 3.4.1 (the "License");
you may not use the Oculus SDK except in compliance with the License,
which is provided at the time of installation or download, or which
otherwise accompanies this software in either electronic or hard copy form.
@@ -11,7 +11,7 @@ You may obtain a copy of the License at
https://developer.oculus.com/licenses/sdk-3.4.1
Unless required by applicable law or agreed to in writing, the Oculus VR SDK
Unless required by applicable law or agreed to in writing, the Oculus SDK
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and

View File

@@ -1,9 +1,9 @@
/************************************************************************************
Copyright : Copyright 2017 Oculus VR, LLC. All Rights reserved.
Copyright : Copyright (c) Facebook Technologies, LLC and its affiliates. All rights reserved.
Licensed under the Oculus VR Rift SDK License Version 3.4.1 (the "License");
you may not use the Oculus VR Rift SDK except in compliance with the License,
Licensed under the Oculus SDK License Version 3.4.1 (the "License");
you may not use the Oculus SDK except in compliance with the License,
which is provided at the time of installation or download, or which
otherwise accompanies this software in either electronic or hard copy form.
@@ -12,7 +12,7 @@ You may obtain a copy of the License at
https://developer.oculus.com/licenses/sdk-3.4.1
Unless required by applicable law or agreed to in writing, the Oculus VR SDK
Unless required by applicable law or agreed to in writing, the Oculus SDK
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and

View File

@@ -1,7 +1,7 @@
fileFormatVersion: 2
guid: 99bbd170d56da4248941de890e6d7af5
timeCreated: 1501004238
licenseType: Pro
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []

View File

@@ -1,9 +1,9 @@
/************************************************************************************
Copyright : Copyright 2017 Oculus VR, LLC. All Rights reserved.
Copyright : Copyright (c) Facebook Technologies, LLC and its affiliates. All rights reserved.
Licensed under the Oculus VR Rift SDK License Version 3.4.1 (the "License");
you may not use the Oculus VR Rift SDK except in compliance with the License,
Licensed under the Oculus SDK License Version 3.4.1 (the "License");
you may not use the Oculus SDK except in compliance with the License,
which is provided at the time of installation or download, or which
otherwise accompanies this software in either electronic or hard copy form.
@@ -11,7 +11,7 @@ You may obtain a copy of the License at
https://developer.oculus.com/licenses/sdk-3.4.1
Unless required by applicable law or agreed to in writing, the Oculus VR SDK
Unless required by applicable law or agreed to in writing, the Oculus SDK
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and

View File

@@ -1,9 +1,9 @@
/************************************************************************************
Copyright : Copyright 2017 Oculus VR, LLC. All Rights reserved.
Copyright : Copyright (c) Facebook Technologies, LLC and its affiliates. All rights reserved.
Licensed under the Oculus VR Rift SDK License Version 3.4.1 (the "License");
you may not use the Oculus VR Rift SDK except in compliance with the License,
Licensed under the Oculus SDK License Version 3.4.1 (the "License");
you may not use the Oculus SDK except in compliance with the License,
which is provided at the time of installation or download, or which
otherwise accompanies this software in either electronic or hard copy form.
@@ -11,7 +11,7 @@ You may obtain a copy of the License at
https://developer.oculus.com/licenses/sdk-3.4.1
Unless required by applicable law or agreed to in writing, the Oculus VR SDK
Unless required by applicable law or agreed to in writing, the Oculus SDK
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and

View File

@@ -1,9 +1,9 @@
/************************************************************************************
Copyright : Copyright 2017 Oculus VR, LLC. All Rights reserved.
Copyright : Copyright (c) Facebook Technologies, LLC and its affiliates. All rights reserved.
Licensed under the Oculus VR Rift SDK License Version 3.4.1 (the "License");
you may not use the Oculus VR Rift SDK except in compliance with the License,
Licensed under the Oculus SDK License Version 3.4.1 (the "License");
you may not use the Oculus SDK except in compliance with the License,
which is provided at the time of installation or download, or which
otherwise accompanies this software in either electronic or hard copy form.
@@ -12,7 +12,7 @@ You may obtain a copy of the License at
https://developer.oculus.com/licenses/sdk-3.4.1
Unless required by applicable law or agreed to in writing, the Oculus VR SDK
Unless required by applicable law or agreed to in writing, the Oculus SDK
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and

View File

@@ -1,9 +1,9 @@
/************************************************************************************
Copyright : Copyright 2017 Oculus VR, LLC. All Rights reserved.
Copyright : Copyright (c) Facebook Technologies, LLC and its affiliates. All rights reserved.
Licensed under the Oculus VR Rift SDK License Version 3.4.1 (the "License");
you may not use the Oculus VR Rift SDK except in compliance with the License,
Licensed under the Oculus SDK License Version 3.4.1 (the "License");
you may not use the Oculus SDK except in compliance with the License,
which is provided at the time of installation or download, or which
otherwise accompanies this software in either electronic or hard copy form.
@@ -11,7 +11,7 @@ You may obtain a copy of the License at
https://developer.oculus.com/licenses/sdk-3.4.1
Unless required by applicable law or agreed to in writing, the Oculus VR SDK
Unless required by applicable law or agreed to in writing, the Oculus SDK
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and

View File

@@ -1,9 +1,9 @@
/************************************************************************************
Copyright : Copyright 2017 Oculus VR, LLC. All Rights reserved.
Copyright : Copyright (c) Facebook Technologies, LLC and its affiliates. All rights reserved.
Licensed under the Oculus VR Rift SDK License Version 3.4.1 (the "License");
you may not use the Oculus VR Rift SDK except in compliance with the License,
Licensed under the Oculus SDK License Version 3.4.1 (the "License");
you may not use the Oculus SDK except in compliance with the License,
which is provided at the time of installation or download, or which
otherwise accompanies this software in either electronic or hard copy form.
@@ -12,7 +12,7 @@ You may obtain a copy of the License at
https://developer.oculus.com/licenses/sdk-3.4.1
Unless required by applicable law or agreed to in writing, the Oculus VR SDK
Unless required by applicable law or agreed to in writing, the Oculus SDK
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and

View File

@@ -1,7 +1,7 @@
fileFormatVersion: 2
guid: 3303d4232ee59ac40a9fdc223870fbbc
timeCreated: 1520636357
licenseType: Pro
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []

View File

@@ -1,9 +1,9 @@
/************************************************************************************
Copyright : Copyright 2017 Oculus VR, LLC. All Rights reserved.
Copyright : Copyright (c) Facebook Technologies, LLC and its affiliates. All rights reserved.
Licensed under the Oculus VR Rift SDK License Version 3.4.1 (the "License");
you may not use the Oculus VR Rift SDK except in compliance with the License,
Licensed under the Oculus SDK License Version 3.4.1 (the "License");
you may not use the Oculus SDK except in compliance with the License,
which is provided at the time of installation or download, or which
otherwise accompanies this software in either electronic or hard copy form.
@@ -11,7 +11,7 @@ You may obtain a copy of the License at
https://developer.oculus.com/licenses/sdk-3.4.1
Unless required by applicable law or agreed to in writing, the Oculus VR SDK
Unless required by applicable law or agreed to in writing, the Oculus SDK
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and

View File

@@ -1,9 +1,9 @@
/************************************************************************************
Copyright : Copyright 2017 Oculus VR, LLC. All Rights reserved.
Copyright : Copyright (c) Facebook Technologies, LLC and its affiliates. All rights reserved.
Licensed under the Oculus VR Rift SDK License Version 3.4.1 (the "License");
you may not use the Oculus VR Rift SDK except in compliance with the License,
Licensed under the Oculus SDK License Version 3.4.1 (the "License");
you may not use the Oculus SDK except in compliance with the License,
which is provided at the time of installation or download, or which
otherwise accompanies this software in either electronic or hard copy form.
@@ -12,7 +12,7 @@ You may obtain a copy of the License at
https://developer.oculus.com/licenses/sdk-3.4.1
Unless required by applicable law or agreed to in writing, the Oculus VR SDK
Unless required by applicable law or agreed to in writing, the Oculus SDK
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and

View File

@@ -1,7 +1,7 @@
fileFormatVersion: 2
guid: 63f0fe0d60ddeb54f9f43d701286af2d
timeCreated: 1520636357
licenseType: Pro
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []

View File

@@ -1,9 +1,9 @@
/************************************************************************************
Copyright : Copyright 2017 Oculus VR, LLC. All Rights reserved.
Copyright : Copyright (c) Facebook Technologies, LLC and its affiliates. All rights reserved.
Licensed under the Oculus VR Rift SDK License Version 3.4.1 (the "License");
you may not use the Oculus VR Rift SDK except in compliance with the License,
Licensed under the Oculus SDK License Version 3.4.1 (the "License");
you may not use the Oculus SDK except in compliance with the License,
which is provided at the time of installation or download, or which
otherwise accompanies this software in either electronic or hard copy form.
@@ -11,7 +11,7 @@ You may obtain a copy of the License at
https://developer.oculus.com/licenses/sdk-3.4.1
Unless required by applicable law or agreed to in writing, the Oculus VR SDK
Unless required by applicable law or agreed to in writing, the Oculus SDK
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and

View File

@@ -1,9 +1,9 @@
/************************************************************************************
Copyright : Copyright 2017 Oculus VR, LLC. All Rights reserved.
Copyright : Copyright (c) Facebook Technologies, LLC and its affiliates. All rights reserved.
Licensed under the Oculus VR Rift SDK License Version 3.4.1 (the "License");
you may not use the Oculus VR Rift SDK except in compliance with the License,
Licensed under the Oculus SDK License Version 3.4.1 (the "License");
you may not use the Oculus SDK except in compliance with the License,
which is provided at the time of installation or download, or which
otherwise accompanies this software in either electronic or hard copy form.
@@ -11,7 +11,7 @@ You may obtain a copy of the License at
https://developer.oculus.com/licenses/sdk-3.4.1
Unless required by applicable law or agreed to in writing, the Oculus VR SDK
Unless required by applicable law or agreed to in writing, the Oculus SDK
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and

View File

@@ -1,9 +1,9 @@
/************************************************************************************
Copyright : Copyright 2017 Oculus VR, LLC. All Rights reserved.
Copyright : Copyright (c) Facebook Technologies, LLC and its affiliates. All rights reserved.
Licensed under the Oculus VR Rift SDK License Version 3.4.1 (the "License");
you may not use the Oculus VR Rift SDK except in compliance with the License,
Licensed under the Oculus SDK License Version 3.4.1 (the "License");
you may not use the Oculus SDK except in compliance with the License,
which is provided at the time of installation or download, or which
otherwise accompanies this software in either electronic or hard copy form.
@@ -11,7 +11,7 @@ You may obtain a copy of the License at
https://developer.oculus.com/licenses/sdk-3.4.1
Unless required by applicable law or agreed to in writing, the Oculus VR SDK
Unless required by applicable law or agreed to in writing, the Oculus SDK
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and

View File

@@ -1,9 +1,9 @@
/************************************************************************************
Copyright : Copyright 2017 Oculus VR, LLC. All Rights reserved.
Copyright : Copyright (c) Facebook Technologies, LLC and its affiliates. All rights reserved.
Licensed under the Oculus VR Rift SDK License Version 3.4.1 (the "License");
you may not use the Oculus VR Rift SDK except in compliance with the License,
Licensed under the Oculus SDK License Version 3.4.1 (the "License");
you may not use the Oculus SDK except in compliance with the License,
which is provided at the time of installation or download, or which
otherwise accompanies this software in either electronic or hard copy form.
@@ -12,7 +12,7 @@ You may obtain a copy of the License at
https://developer.oculus.com/licenses/sdk-3.4.1
Unless required by applicable law or agreed to in writing, the Oculus VR SDK
Unless required by applicable law or agreed to in writing, the Oculus SDK
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and

View File

@@ -1,7 +1,7 @@
fileFormatVersion: 2
guid: aed62bf3ae2456c408f247f96808ce96
timeCreated: 1486166271
licenseType: Free
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []

View File

@@ -1,9 +1,9 @@
/************************************************************************************
Copyright : Copyright 2017 Oculus VR, LLC. All Rights reserved.
Copyright : Copyright (c) Facebook Technologies, LLC and its affiliates. All rights reserved.
Licensed under the Oculus VR Rift SDK License Version 3.4.1 (the "License");
you may not use the Oculus VR Rift SDK except in compliance with the License,
Licensed under the Oculus SDK License Version 3.4.1 (the "License");
you may not use the Oculus SDK except in compliance with the License,
which is provided at the time of installation or download, or which
otherwise accompanies this software in either electronic or hard copy form.
@@ -11,7 +11,7 @@ You may obtain a copy of the License at
https://developer.oculus.com/licenses/sdk-3.4.1
Unless required by applicable law or agreed to in writing, the Oculus VR SDK
Unless required by applicable law or agreed to in writing, the Oculus SDK
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and