SDK_BaseHeadset
extends SDK_Base
Overview
The Base Headset SDK script provides a bridge to SDK methods that deal with the VR Headset.
This is an abstract class to implement the interface required by all implemented SDKs.
Class Variables
public enum HeadsetType
- The connected headset typeUndefined
- The headset connected is unknown.Simulator
- The headset associated with the simulator.HTCVive
- The HTC Vive headset.OculusRiftDK1
- The Oculus Rift DK1 headset.OculusRiftDK2
- The Oculus Rift DK2 headset.OculusRift
- The Oculus Rift headset.OculusGearVR
- The Oculus GearVR headset.GoogleDaydream
- The Google Daydream headset.GoogleCardboard
- The Google Cardboard headset.HyperealVR
- The HyperealVR headset.WindowsMixedReality
- The Windows Mixed Reality headset.
Class Methods
ProcessUpdate/1
public abstract void ProcessUpdate(Dictionary<string, object> options);
- Parameters
Dictionary<string, object> options
- A dictionary of generic options that can be used to within the update.
- Returns
- none
The ProcessUpdate method enables an SDK to run logic for every Unity Update
ProcessFixedUpdate/1
public abstract void ProcessFixedUpdate(Dictionary<string, object> options);
- Parameters
Dictionary<string, object> options
- A dictionary of generic options that can be used to within the fixed update.
- Returns
- none
The ProcessFixedUpdate method enables an SDK to run logic for every Unity FixedUpdate
GetHeadset/0
public abstract Transform GetHeadset();
- Parameters
- none
- Returns
Transform
- A transform of the object representing the headset in the scene.
The GetHeadset method returns the Transform of the object that is used to represent the headset in the scene.
GetHeadsetCamera/0
public abstract Transform GetHeadsetCamera();
- Parameters
- none
- Returns
Transform
- A transform of the object holding the headset camera in the scene.
The GetHeadsetCamera method returns the Transform of the object that is used to hold the headset camera in the scene.
GetHeadsetType/0
public abstract string GetHeadsetType();
- Parameters
- none
- Returns
string
- The string of the headset connected.
The GetHeadsetType method returns a string representing the type of headset connected.
GetHeadsetVelocity/0
public abstract Vector3 GetHeadsetVelocity();
- Parameters
- none
- Returns
Vector3
- A Vector3 containing the current velocity of the headset.
The GetHeadsetVelocity method is used to determine the current velocity of the headset.
GetHeadsetAngularVelocity/0
public abstract Vector3 GetHeadsetAngularVelocity();
- Parameters
- none
- Returns
Vector3
- A Vector3 containing the current angular velocity of the headset.
The GetHeadsetAngularVelocity method is used to determine the current angular velocity of the headset.
HeadsetFade/3
public abstract void HeadsetFade(Color color, float duration, bool fadeOverlay = false);
- Parameters
Color color
- The colour to fade to.float duration
- The amount of time the fade should take to reach the given colour.bool fadeOverlay
- Determines whether to use an overlay on the fade.
- Returns
- none
The HeadsetFade method is used to apply a fade to the headset camera to progressively change the colour.
HasHeadsetFade/1
public abstract bool HasHeadsetFade(Transform obj);
- Parameters
Transform obj
- The Transform to check to see if a camera fade is available on.
- Returns
bool
- Returns true if the headset has fade functionality on it.
The HasHeadsetFade method checks to see if the given game object (usually the camera) has the ability to fade the viewpoint.
AddHeadsetFade/1
public abstract void AddHeadsetFade(Transform camera);
- Parameters
Transform camera
- The Transform to with the camera on to add the fade functionality to.
- Returns
- none
The AddHeadsetFade method attempts to add the fade functionality to the game object with the camera on it.
Updated less than a minute ago