VRTK_SDKSetup
Overview
The SDK Setup describes a list of SDKs and game objects to use.
Inspector Parameters
- Auto Populate Object References: Determines whether the SDK object references are automatically set to the objects of the selected SDKs. If this is true populating is done whenever the selected SDKs change.
- Actual Boundaries: A reference to the GameObject that is the user's boundary or play area, most likely provided by the SDK's Camera Rig.
- Actual Headset: A reference to the GameObject that contains the VR camera, most likely provided by the SDK's Camera Rig Headset.
- Actual Left Controller: A reference to the GameObject that contains the SDK Left Hand Controller.
- Actual Right Controller: A reference to the GameObject that contains the SDK Right Hand Controller.
- Model Alias Left Controller: A reference to the GameObject that models for the Left Hand Controller.
- Model Alias Right Controller: A reference to the GameObject that models for the Right Hand Controller.
Class Variables
public VRTK_SDKInfo systemSDKInfo
- The info of the SDK to use to deal with all system actions. By setting this tonull
the fallback SDK will be used.public VRTK_SDKInfo boundariesSDKInfo
- The info of the SDK to use to utilize room scale boundaries. By setting this tonull
the fallback SDK will be used.public VRTK_SDKInfo headsetSDKInfo
- The info of the SDK to use to utilize the VR headset. By setting this tonull
the fallback SDK will be used.public VRTK_SDKInfo controllerSDKInfo
- The info of the SDK to use to utilize the input devices. By setting this tonull
the fallback SDK will be used.public SDK_BaseSystem systemSDK
- The selected system SDK.public SDK_BaseBoundaries boundariesSDK
- The selected boundaries SDK.public SDK_BaseHeadset headsetSDK
- The selected headset SDK.public SDK_BaseController controllerSDK
- The selected controller SDK.public string[] usedVRDeviceNames
- The VR device names used by the currently selected SDKs.public bool isValid
- Whether it's possible to use the Setup. SeeGetSimplifiedErrorDescriptions
for more info.
Unity Events
Adding the VRTK_SDKSetup_UnityEvents
component to VRTK_SDKSetup
object allows access to UnityEvents
that will react identically to the Class Events.
- All C# delegate events are mapped to a Unity Event with the
On
prefix. e.g.MyEvent
->OnMyEvent
.
Class Methods
PopulateObjectReferences/1
public void PopulateObjectReferences(bool force)
- Parameters
bool force
- Whether to ignoreautoPopulateObjectReferences
while deciding to populate.
- Returns
- none
The PopulateObjectReferences method populates the object references by using the currently set SDKs.
GetSimplifiedErrorDescriptions/0
public string[] GetSimplifiedErrorDescriptions()
- Parameters
- none
- Returns
string[]
- An array of all the error descriptions. Returns an empty array if no errors are found.
The GetSimplifiedErrorDescriptions method checks the setup for errors and creates an array of error descriptions. The returned error descriptions handle the following cases for the current SDK infos:
- Its type doesn't exist anymore. It's a fallback SDK. It doesn't have its scripting define symbols added. * It's missing its vendor SDK.Additionally the current SDK infos are checked whether they use multiple VR Devices.
OnLoaded/1
public void OnLoaded(VRTK_SDKManager sender)
- Parameters
VRTK_SDKManager sender
- The SDK Manager that has loaded the SDK Setup.
- Returns
- none
The OnLoaded method determines when an SDK Setup has been loaded.
OnUnloaded/1
public void OnUnloaded(VRTK_SDKManager sender)
- Parameters
VRTK_SDKManager sender
- The SDK Manager that has unloaded the SDK Setup.
- Returns
- none
The OnUnloaded method determines when an SDK Setup has been unloaded.
Updated less than a minute ago