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. Dismiss Notice

Question how to use platform dependent compilation in Bolt?

Discussion in 'Visual Scripting' started by enzoravo, Mar 24, 2021.

  1. enzoravo

    enzoravo

    Joined:
    Jun 25, 2013
    Posts:
    284
    hello, i'm just wondering how i will use platform dependent compilation in bolt, what i'm trying to do is move these lines of code to visual scripting using bolt

    Code (csharp):
    1.  
    2. #if !UNITY_EDITOR && UNITY_WEBGL
    3.        WebGLInput.captureAllKeyboardInput = false;
    4. #endif
    5.  
    thanks in advance for all the help.
     
    Ruchir likes this.
  2. ericb_unity

    ericb_unity

    Unity Technologies

    Joined:
    Nov 24, 2017
    Posts:
    167
    It is not possible out of the box at the moment. You may need to make custom C# nodes with the if def in it.
     
    enzoravo likes this.
  3. enzoravo

    enzoravo

    Joined:
    Jun 25, 2013
    Posts:
    284
    thanks for the info @ericb_unity, is there any sample to look at ?
     
  4. ericb_unity

    ericb_unity

    Unity Technologies

    Joined:
    Nov 24, 2017
    Posts:
    167
    No, but if i can get time today, I will try to do some tests with different uses case.
     
    enzoravo likes this.