Native C# SDK for custom engine?

Hello everyone,

Do you know if it's possible to make games for immersive headsets without Unity? I've a custom engine powered by MonoGame which already supports VR. However I don't find any SDK for C#, all seems to be for Unity.

French XR/MR developer / Indie Game Developer

Answers

  • PatrickPatrick mod
    edited September 11

    You can use the Windows UWP Apis to implement VR support in C#.

    https://developer.microsoft.com/en-us/windows/mixed-reality/directx_development_overview

    (note that the Visual Studio templates aren't quite published yet)

    I'm curious how challenging this is to implement in your game engine. I'm guessing rendering is where you want to start, and that starts with getting a HolographicSpace:

    https://developer.microsoft.com/en-us/windows/mixed-reality/getting_a_holographicspace

    ===
    This post provided as-is with no warranties and confers no rights. Using information provided is done at own risk.

    (Daddy, what does 'now formatting drive C:' mean?)

  • Well, it's not so hard if the API is well made. Basically we've to create two render targets (one per eye). In the rendering process, we first draw the left eye and the right eye. To draw eyes we use data sent by the headset. So the minimum required to implement VR in my engine is:

    • IsDeviceConnected()
    • GetProjectionMatrix(bool leftEye, ref Matrix matrix);
    • GetViewMatrix(bool leveEye, ref Matrix matrix);
    • SubmitRenderTargets(RenderTarget left, RenderTarget right);

    And for controllers I can use the InputManager API.

    French XR/MR developer / Indie Game Developer

Sign In or Register to comment.