mirror of
https://github.com/ValveSoftware/Unity.git
synced 2026-11-17 02:00:35 +00:00
No description
- C# 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
**Breaking change: `ValveOpenXRRefreshRateFeature` and `OnRefreshRateFeatureAvailableDelegate` moved from the global namespace into `Valve.OpenXR.Utils`. Scripts that use them need `using Valve.OpenXR.Utils;`.** ## [1.1.0] - 2026-10-21 ### Added - New feature **Valve Utils: Display Time** (`ValveOpenXRDisplayTimeFeature`). It hooks `xrWaitFrame` through the plugin's `xrGetInstanceProcAddr` chain and exposes the frame's predicted display time and period to other features through `TryGetPredictedDisplayTime` and `TryGetPredictedDisplayPeriod`. - New feature **Valve Utils: Render Models** (`ValveOpenXRRenderModelFeature`). Moved out of the sample and refined. Allows access to OpenXR's XR_EXT_render_model. - New feature **Valve Utils: System Info** (`ValveOpenXRSystemInfoFeature`). Moved out of the System Info sample and refined. Reports the OpenXR system name and whether the app runs on Steam Frame itself. - `ValveOpenXRDelegates.TryGetInstanceProc`, replaces the three copies in the Refresh Rate, Render Models and Settings for Unity's Rendering features. ### Changed - Requires Unity OpenXR Plugin 1.16.0 or newer. The features use the plugin's `UnityEngine.XR.OpenXR.NativeTypes` (`XrResult`, `XrPosef`, `XrStructureType` and so on) instead of private copies. `Valve.OpenXR.Utils.XrVector2f` was removed in favour of the plugin's type. ### Fixed - `EditorUtils.UsesVulkan` checked the Android graphics APIs whatever build target it was given. - Enabling some Valve Utils features next to another feature that hooks `xrGetInstanceProcAddr` from managed code (for example the Basis Meta body tracking feature, or anything following Unity's intercept sample) threw `InvalidCastException` during session start breaking the app. `ValveOpenXRDelegates.TryFromFunctionPointer` accepts a managed hook as well as a native pointer to fix this. - Failures while resolving OpenXR functions are now logged and leave the feature unavailable instead of throwing out of Unity's lifecycle callbacks. ### Refresh Rate ### Changed - `ValveOpenXRRefreshRateFeature` and `OnRefreshRateFeatureAvailableDelegate` moved from the global namespace into `Valve.OpenXR.Utils`. Scripts that use them need `using Valve.OpenXR.Utils;`. The sample has it. ### Fixed - The Refresh Rate feature called `OnSessionDestroy` from `OnSessionEnd`. - `OnRefreshRateFeatureAvailable` lost its subscribers when the session stopped, and a throwing subscriber stopped later features from starting. - After the session was destroyed the feature still called the runtime with the old session handle. - `EnumerateRefreshRates` queries the runtime once per session, and the sample no longer allocates every frame. ### Render Models ### Added - `CreateRenderModelAsync` creates a model and copies its glTF data on a worker thread. ### Changed - Lots of performance improvements. - Models are addressed by OpenXR top level user path (`UserPaths.LeftHand`, `/user/hand/right`, tracker roles and so on) rather than a hand flag. - The offered models are now enumerated and described on a worker thread. - The feature raises `RenderModelsChanged` when a refresh of the offered models finishes, when the session begins and after it is destroyed. The sample loader reacts to it instead of polling. - The sample creates models with `CreateRenderModelAsync` and requests glTFast limit work to 2 ms per frame. ### Fixed - Controller orientation in the sample was previously using the grip pose, in the new feature this now properly uses `xrLocateSpace` with the predicted display time from the new `ValveOpenXRDisplayTimeFeature`. - Now only queries the runtime while a session is active. - Controllers turned on after session start are now properly recognized. - The sample's project validation adds the glTFast shaders the active render pipeline uses to the preloaded assets. ### Foveated Rendering ### Changed - `foveatedRenderingLevel`, `eyeTrackedFoveation` and `GetFoveationEyeTrackedCenter` no longer allocate on every call. - `GetFoveationEyeTrackedCenter` resolves its OpenXR function once per instance instead of retrying and logging on every call. ### System Info ### Changed - The sample's `SystemInfoFeature` is now the package's `ValveOpenXRSystemInfoFeature`. `IsRunnginOnSteamFrame` is `IsLocalSteamFrame`, which also requires the Frame's Adreno 750 so a PC streaming to a Frame returns false. - The feature resolves `xrGetSystemProperties` through `ValveOpenXRDelegates.TryGetInstanceProc` and no longer requires, enables or validates the Settings for Unity's Rendering feature. - `GetHeadsetName` and `IsLocalSteamFrame` query the runtime once per system and no longer log the system name. ### Settings for Unity's Rendering ### Removed - The feature's now redundant OpenXR access API is gone: `GetOpenXrInstanceProc`, `HasOpenXRInstance`, `GetOpenXRInstance`, `HasSession`, `GetSession` and the `OnInstanceCreated`, `OnInstanceDestroyed`, `OnSessionCreated` and `OnSessionDestroyed` events with their delegate types. Function resolution moved to `ValveOpenXRDelegates.TryGetInstanceProc`, which is now public and takes the calling feature's own `xrGetInstanceProcAddr` and instance handle. |
||
| com.valvesoftware.openxr.utils | ||
| .gitignore | ||
| LICENSE.md | ||
| README.md | ||
Unity resources
This repo provides a collection of useful plugins and samples for Unity developers.
Packages
| Name | Package | Description | Documentation |
|---|---|---|---|
| Open XR Utilities | com.valvesoftware.openxr.utils | Provides improved access and configuration to the OpenXR features provided by Unity. | Documentation |