Hello everyone.

The Mixed Reality Forums here are no longer being used or maintained.

There are a few other places we would like to direct you to for support, both from Microsoft and from the community.

The first way we want to connect with you is our mixed reality developer program, which you can sign up for at https://aka.ms/IWantMR.

For technical questions, please use Stack Overflow, and tag your questions using either hololens or windows-mixed-reality.

If you want to join in discussions, please do so in the HoloDevelopers Slack, which you can join by going to https://aka.ms/holodevelopers, or in our Microsoft Tech Communities forums at https://techcommunity.microsoft.com/t5/mixed-reality/ct-p/MicrosoftMixedReality.

And always feel free to hit us up on Twitter @MxdRealityDev.

Is there a possibility to use Unity Engine without Unity Editor

Hi Guys!

I wanted to ask if it's possible to use the Unity render without the Unity Editor? Than I have always problems to compile code which is not compatible with the .Net version which Unity uses to compile the project.

Thank you in advance.

Best regards
sens

Tagged:

Answers

  • AlexDAlexD ✭✭✭
    edited October 2016

    I know there are a lot of instances where you'd want your code to run only when actually running on the device, but you want to maintain debug-ability in the Unity Editor. For that, you can use conditional compilation statements #if in your code to make it run in Unity Editor as well -

    #if !UNITY_EDITOR
       //code will not run when app is in the Editor context
    #endif
    

    Hope this helps

  • jbienzmsjbienzms mod
    edited October 2016

    @sens are you asking if you could use, for example, a JavaScript Unity project on HoloLens or are you asking if you can reuse a project you've targeted for another platform?

    @AlexD is correct about using conditional compile statements to exclude code from other platforms. He used The #if !UNITY_EDITOR up above but there are many more. For example, if you want to exclude code from an IOS build you could use #if UNITY_IOS. When I am writing code that only works on HoloLens (or Windows 10) I use #if WINDOWS_UWP.

    A mostly complete list of Unity conditional compile statements can be found here.

    If you're asking about running a Unity JavaScript app on HoloLens, I believe that's possible but I've not tested it. You would still need to use the right version of Unity for HoloLens to set the project up and export it, but the JavaScript behaviours should get exported in the Unity asset blob that gets loaded in the UWP app, so I believe at least in theory it would work. If you test this, please let us know the results.

    Our Holographic world is here

    RoadToHolo.com      WikiHolo.net      @jbienz
    I work in Developer Experiences at Microsoft. My posts are based on my own experience and don't represent Microsoft or HoloLens.

Sign In or Register to comment.