コンテンツにスキップ

OVRApplication クラス

Owns an initialized OpenVR application context.

名前空間: FloatSoda.OVR
アセンブリ: FloatSoda.OVR.dll

public class OVRApplication : IDisposable

object ← OVRApplication

IDisposable

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()

Dispose the instance after all OpenVR objects have stopped using the process-wide context.

Instantiate and initialize a new OVRApplication. Internally, this initializes the process-wide OpenVR API using appInfo.

public OVRApplication(OVRAppInfo appInfo)

appInfo OVRAppInfo

The application identity and type used to initialize OpenVR.

VRInitializeException

OpenVR initialization fails.

Gets or sets whether SteamVR launches this application automatically.

public bool AutoLaunch { get; set; }

bool

Gets the application information used for initialization.

public OVRAppInfo Info { get; init; }

OVRAppInfo

Gets whether the application key is currently registered with SteamVR.

public bool Installed { get; }

bool

Gets the initialized OpenVR system interface.

public CVRSystem OVRSystem { get; init; }

CVRSystem

Shuts down the process-wide OpenVR context.

public void Dispose()

Releases the OpenVR context if the application was not disposed explicitly.

protected ~OVRApplication()

Registers this process with SteamVR under Info’s application key.

public void Identify()

Init only bootstraps the OpenVR API; it does not associate the calling process with a manifest’s app_key. Call this once during startup — SteamVR needs the process/AppKey association for AutoLaunch and scene-transition behavior to work correctly. Requires Info’s key to already be registered with SteamVR (see AddManifest and Installed); otherwise this throws VRApplicationException with UnknownApplication.

VRApplicationException

The application key is not registered with SteamVR, or another OpenVR application error occurred.