TBSettings

Static interface for controlling TButt’s behavior across different platforms.

Overview

TBSettings unifies VR settings across different platforms and exposes settings that are unique to individual platforms. Most of these settings can be defined using the Core Settings editor window.

Dependencies

  • The scene contains a TBCore object
  • At least one platform is enabled in the Core Settings menu

Setup

Use the Core Settings editor window to specify all the settings you want.

Reference

Get the TButt namespace to reference TBSettings in your scripts.

using TButt;

Renderscale

Use TBSettings.SetRenderscale(float newScale) to set the (XRSettings.eyeTextureResolutionScale) at runtime.

TBQualityLevel

TButt’s optional quality level system can be useful for putting different features into quality buckets. For example, you could adjust the complexity of your VFX for mobile platforms versus PC platforms. See the Performance Settings page for more information.

Function Description
SetQualityLevel(TBQualityLevel level) Sets the TBQualityLevel at runtime.
TBQualityLevel GetCurrentQualityLevel() Gets the TBQualityLevel at runtime.

TBCameraSettings

Exposes camera settings for the active platform as defined with the Core Settings tool. Accessible with TBSettings.GetCameraSettings().

Value Description
TBTrackingOrigin trackingOrigin Desired tracking origin for TBCameraRig. Options: Floor Eye
float uncalibratedFloorHeight Height (in meters) that will be used if the active platform does not provide the player’s height
KeyCode calibrationHotkey Editor-only hotkey for resetting (calibrating) tracking for the headset and controllers

TBControlSettings

Exposes control settings for the active platform as defined with the Core Settings tool. Accessible with TBSettings.GetControlSettings().

Value Description
bool supportsHandControllers True if 6DOF hand controllers were enabled at startup.
bool supports3DOFControllers True if 3DOF controllers were enabled at startup.
bool supportsClickRemote True if click remotes were enabled at startup.
bool supportsGamepad True if gamepads were enabled at startup.
bool useInputEvents When true, TBInput.Events will be usable at runtime. This value is ignored and events are turned on if 3DOF controllers are enabled.
TBInput.ControlType defaultEditorControlType ControlType assigned immediately when entering play mode in the editor.
bool emulate3DOFArmModel When true, TButt will use a 6DOF controllers to emulate a 3DOF controller while playing in the editor.
TBHardwareHandedness handedness3DOF Handedness when emulating a 3DOF arm model. Options: Left Right

TBDisplaySettings

Exposes display settings for the active platform as defined with the Core Settings tool. Accessible with TBSettings.GetDisplaySettings().

Value Description
TBTimestep targetTimestep Describes the relationship between Time.fixedDeltaTime and the headset’s refresh rate as configured at startup. Options: Half Locked
TBTimestep maxTimestep Describes the relationship between Time.maximumDeltaTime and the headset’s refresh rate as configured at startup. Options: Half Locked
float renderscale The value assigned to XRSettings.eyeTextureResolutionScale at startup.
TBQualityLevel qualityLevel The TBQualityLevel assigned at runtime.
OpaqueSortMode opaqueSortMode The GPU sorting mode applied to the camera at startup. See Unity documentation for more information.
DepthTextureMode depthTextureMode The depth texture mode used by the camera at startup. See Unity documentation for more information.
TBRefreshRate refreshRate The refresh rate applied at startup. Only applies to headsets that support multiple refresh rates.