struct SKSettings

StereoKit initialization settings! Setup SK.settings with your data before calling SK.Initialize.

Instance Fields and Properties

   
IntPtr androidActivity A JNI reference to an android.content.Context associated with the application, only used for Android applications. Xamarin and Maui apps will use the MainActivity.Handle for this.
IntPtr androidJavaVm A pointer to the JNI’s JavaVM structure, only used for Android applications. This is optional, even for Android.
string appName Name of the application, this shows up an the top of the Win32 window, and is submitted to OpenXR. OpenXR caps this at 128 characters.
string assetsFolder Where to look for assets when loading files! Final path will look like ‘[assetsFolder]/[file]’, so a trailing ‘/’ is unnecessary.
DisplayBlend blendPreference What type of background blend mode do we prefer for this application? Are you trying to build an Opaque/Immersive/VR app, or would you like the display to be AnyTransparent, so the world will show up behind your content, if that’s an option? Note that this is a preference only, and if it’s not available on this device, the app will fall back to the runtime’s preference instead! By default, (DisplayBlend.None) this uses the runtime’s preference.
DepthMode depthMode What kind of depth buffer should StereoKit use? A fast one, a detailed one, one that uses stencils? By default, StereoKit uses a balanced mix depending on platform, prioritizing speed but opening up when there’s headroom.
bool disableDesktopInputWindow By default, StereoKit will open a desktop window for keyboard input due to lack of XR-native keyboard APIs on many platforms. If you don’t want this, you can disable it with this setting!
bool disableFlatscreenMRSim By default, StereoKit will simulate Mixed Reality input so developers can test MR spaces without being in a headset. If You don’t want this, you can disable it with this setting!
bool disableUnfocusedSleep By default, StereoKit will slow down when the application is out of focus. This is useful for saving processing power while the app is out-of-focus, but may not always be desired. In particular, running multiple copies of a SK app for testing networking code may benefit from this setting.
DisplayMode displayPreference Which display type should we try to load? Default is DisplayMode.MixedReality.
int flatscreenHeight If using Runtime.Flatscreen, the pixel size of the window on the screen.
int flatscreenPosX If using Runtime.Flatscreen, the pixel position of the window on the screen.
int flatscreenPosY If using Runtime.Flatscreen, the pixel position of the window on the screen.
int flatscreenWidth If using Runtime.Flatscreen, the pixel size of the window on the screen.
LogLevel logFilter The default log filtering level. This can be changed at runtime, but this allows you to set the log filter before Initialization occurs, so you can choose to get information from that. Default is LogLevel.Info.
AppMode mode Which operation mode should we use for this app? Default is XR, and by default the app will fall back to Simulator if XR fails or is unavailable.
bool noFlatscreenFallback If the preferred display fails, should we avoid falling back to flatscreen and just crash out? Default is false.
bool omitEmptyFrames If StereoKit has nothing to render for this frame, it skips submitting a proojection layer to OpenXR entirely.
OriginMode origin Set the behavior of StereoKit’s initial origin. Default behavior is OriginMode.Local, which is the most universally supported origin mode. Different origin modes have varying levels of support on different XR runtimes, and StereoKit will provide reasonable fallbacks for each. NOTE that when falling back, StereoKit will use a different root origin mode plus an offset. You can check World.OriginMode and World.OriginOffset to inspect what StereoKit actually landed on.
bool overlayApp If the runtime supports it, should this application run as an overlay above existing applications? Check SK.System.overlayApp after initialization to see if the runtime could comply with this flag. This will always force StereoKit to work in a blend compositing mode.
uint overlayPriority For overlay applications, this is the order in which apps should be composited together. 0 means first, bottom of the stack, and uint.MaxValue is last, on top of the stack.
int renderMultisample If you know in advance that you need this feature, this setting allows you to set Renderer.Multisample before initialization. This avoids creating and discarding a large and unnecessary swapchain object. Default value is 1.
float renderScaling If you know in advance that you need this feature, this setting allows you to set Renderer.Scaling before initialization. This avoids creating and discarding a large and unnecessary swapchain object. Default value is 1.




Found an issue with these docs, or have some additional questions? Create an Issue on Github!