Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Visual Scripting in EditorXR

Discussion in 'EditorXR' started by Onebenarmy, Dec 2, 2018.

  1. Onebenarmy

    Onebenarmy

    Joined:
    Jun 22, 2016
    Posts:
    5
    Scripting is one big puzzle piece missing for EditorXR to be a fully fledged Editor one day. As im trying to prototype different interaction models for a visual programming environment in VR, I thought it would be great to do that inside EditorXR. How would one go about implementing a code editor as a custom workspace? Is it impossible since code only gets compiled in playmode? Im trying to accomplish something like these guys

    but with an UX focused approach.
     
    Bentoon likes this.
  2. chatrat12

    chatrat12

    Joined:
    Jan 21, 2015
    Posts:
    122
    I think the first thing to understand is that there are 2 classes of visual scripting. One that converts its nodes into code and then gets compiled. And the other, who's nodes are used to call and connect existing functions with no compilation needed.

    I am not aware of any current visual scripter for Unity that compiles it's graphs. Hopefully Unity's take on visual scripting solution will change this.

    The assertion that code only compiled in play mode is incorrect. In fact, trying to get Unity to compile your code once play mode has started, the game will break. (Compilation happens before play mode). Unity compiles as soon as it sees changes to your code and immediately loads the resulting assembly.

    I can't imagine a full fledged visual scripter working in VR. So many nodes to search for, variables to name, values to enter, connections to be made. Something viable for VR would have to be condensed and quite narrow to be manageable to work with. Something with a limited scope like that doesn't need the compiler to work. The video above is not using a compiler.

    I'm a bit skeptical about how productive you can be visual scripting with VR controls. And because of this, I doubt it will ever be taken seriously.
     
  3. Onebenarmy

    Onebenarmy

    Joined:
    Jun 22, 2016
    Posts:
    5
    thanks for your interesting input chatrat12. Im also skeptical about productivity but I am also looking forward to exploring the possibilities of VR. The problems you mentioned are not VR exclusive but exist in a lot of visual scripting tools and I hope to solve them as far as i can in VR.
     
  4. amirebrahimi_unity

    amirebrahimi_unity

    Unity Technologies

    Joined:
    Aug 12, 2015
    Posts:
    400
    Hi @Onebenarmy, I'm catching up on some old threads. You could certainly experiment with editing in VR, however, know that every time a .cs file is saved it will force a recompile and reload of the domain, which will interrupt EditorXR. We have changes that will land soon that will auto-launch EditorXR if you have your headset on, so it would be possible to make edits, have it compile and reload, and then put you back into EditorXR.

    You could mitigate some of these changes by having as much simulation or prototyping in VR and hold off on saving the results until you absolutely need to.