Search Unity

WebGL not working properly with some Nodes from visual scripting

Discussion in 'Visual Scripting' started by Buffonkata, May 24, 2021.

  1. Buffonkata

    Buffonkata

    Joined:
    Feb 3, 2021
    Posts:
    6
    Hey guys i have a major problem with Unity Visual Scripting and WebGL.

    I tried to upload my game on the web. Once i Build and Run the game in WeBGL the functionality of the game is totally broken for some reason. I am using Unity 2021. I tried also with 2020 and 2019 still the problem is the same. For example my player object is rotating towards mouse, and when it is build in WebGL this functionality is not working.
     
  2. ericb_unity

    ericb_unity

    Unity Technologies

    Joined:
    Nov 24, 2017
    Posts:
    167
    Which version of visual scripting that you are using?
     
  3. Buffonkata

    Buffonkata

    Joined:
    Feb 3, 2021
    Posts:
    6
  4. ericb_unity

    ericb_unity

    Unity Technologies

    Joined:
    Nov 24, 2017
    Posts:
    167
    We found an issue with generic operators when we build in WebGL. Could you try to replace your operators for the type you want to use and see if it work properly?
     
  5. eraezer

    eraezer

    Joined:
    Jul 14, 2021
    Posts:
    2
    Hi, I am having this same problem. None of my visual scipting works on WebGL server side or Build and Run. Can you describe what you mean by advice above?
     
  6. PanthenEye

    PanthenEye

    Joined:
    Oct 14, 2013
    Posts:
    2,076
    Generic operators are the ones with green of type "object" inputs. Like there's the scalar Add operator that accepts only floats and ints and there's the generic Add operator with green inputs/ouput that accepts any type. So the advice is to use only the scalar Add.
     
  7. eraezer

    eraezer

    Joined:
    Jul 14, 2021
    Posts:
    2
  8. PanthenEye

    PanthenEye

    Joined:
    Oct 14, 2013
    Posts:
    2,076
    Unity Visual Scripting should run it automatically in theory. For Bolt you have to indeed run it manually.
     
    ericb_unity likes this.