using System.Runtime.InteropServices; namespace Unity.XR.MockHMD { /// /// Runtime scripting API for Mock HMD provider. /// public static class MockHMD { private const string LibraryName = "UnityMockHMD"; /// /// Set the stereo rendering mode. /// /// rendering mode /// true if render mode successfully set [DllImport(LibraryName, EntryPoint = "NativeConfig_SetRenderMode")] public static extern bool SetRenderMode(MockHMDBuildSettings.RenderMode renderMode); /// /// Set the resolution of the eye textures. /// [DllImport(LibraryName, EntryPoint = "NativeConfig_SetEyeResolution")] public static extern bool SetEyeResolution(int width, int height); /// /// Set the crop value applied when rendering the mirror view. /// This is useful to remove the peripheral distorted part of the image. /// /// the amount to remove from the image, valid range is 0.0 to 0.5 [DllImport(LibraryName, EntryPoint = "NativeConfig_SetMirrorViewCrop")] public static extern bool SetMirrorViewCrop(float crop); } }