上传YomovSDK

This commit is contained in:
Sora丶kong
2026-03-03 03:15:46 +08:00
parent 9096da7e6c
commit eb97f31065
6477 changed files with 1932208 additions and 3 deletions

View File

@@ -0,0 +1,9 @@
# Intercept Feature Sample
Demonstrates intercepting an OpenXR method using an OpenXR Feature.
The OpenXR API allows any of its functions to be intercepted by providing a custom [xrGetInstanceProcAddr](https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#xrGetInstanceProcAddr) method. Within Unity this can be done by implementing a custom `OpenXRFeature` and overriding the `HookGetInstanceProcAddr` to provide an alternative version of the `xrGetInstanceProcAddr` method. Once in place this method can return alternative versions of any of the OpenXR methods. In this sample this mechanism is used to _hook_ the [xrCreateSession](https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#xrCreateSession) method such that each time `xrCreateSession` is called it will invoke a C# callback with a message string, which is then displayed on screen.
See the [Unity OpenXR Documentation](https://docs.unity3d.com/Packages/com.unity.xr.openxr@latest) for more information on developing a custom feature.
See the [OpenXR API Specification](https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html) for more information on OpenXR.