-
Notifications
You must be signed in to change notification settings - Fork 10
QuarkXRTextureProvider Script (TextureAPI)
Note: QuarkXRTextureProvider.cs will not work unless you also include QuarkXRClientPlugin.cs in the Unity scene.
TextureAPI has one method.
Methods:
GetTexture
GetTexture();
This method returns UnityEngine.Texture2D object which you can use to render the streamed desktop. We are providing two examples in our package - one with Oculus OVR overlay and one with a basic Material. For more info please refer to the examples below:
The QuarkXR Unity SDK includes several ready prefabs to jumpstart your development:
This prefab can be found in the QuarkXROculusSample project under QuarkXRClientPlugin\Examples\Prefabs and contains all the necessary components required for visualizing the streamed texture with OVROverlay.
QuarkXROVROverlayExample contains three hierarchy game objects:
- QuarkXRPlugin - contains QuarkXRClientPlugin.cs and QuarkXRTextureProvider.cs
- OVROverlay - contains Oculus OVROverlay script.
- OVRBackground - contains background for the OVROverlay.
Note: OVRBackground is required in order for OVROverlay to work.
This prefab can be found in the QuarkXRPicoSample project under QuarkXRClientPlugin\Examples\Prefabs and contains all the necessary components required for visualizing the streamed texture with Pvr_UnitySDKEyeOverlay.
QuarkXRPVROverlayExample contains three hierarchy game objects:
- QuarkXRPlugin - contains QuarkXRClientPlugin.cs and QuarkXRTextureProvider.cs
- PVROverlay - contains PicoVR Pvr_UnitySDKEyeOverlay script.
- PVRBackground - contains background for the PVROverlay.
This prefab uses a standard material with the streamed texture.
- QuarkXRPlugin - contains QuarkXRClientPlugin and QuarkXRTextureProvider.
- VideoPlane - this object contains a plane (mesh filter) and a standard material (QuarkXRSimpleMaterial).
Note: For best visual fidelity of the streamed desktop, QuarkXR recommends the use of OVROverlay or PVROverlay. Each game object included in the prefabs can be resized and repositioned at runtime.