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

Can't build projects for WebGl, 'Robotics' namespace cannot be found?

Discussion in 'Robotics' started by wuxu12, Nov 1, 2021.

  1. wuxu12

    wuxu12

    Joined:
    Oct 20, 2021
    Posts:
    6
    But debug is ok, play is all right.
     

    Attached Files:

    • 11.png
      11.png
      File size:
      120.1 KB
      Views:
      239
  2. LaurieUnity

    LaurieUnity

    Unity Technologies

    Joined:
    Oct 23, 2020
    Posts:
    77
    ROS TCP Connector does not support WebGL - it has to connect to a TCP socket, which is impossible in a WebGL build due to web browser security restrictions.

    (If you just want to use other parts of the package and don't care about connecting to ROS, you can open com.unity.robotics.ros-tcp-connector/Runtime/Unity.Robotics.ROSTCPConnector.asmdef and tick the "WebGL" checkbox. And if you really want to try it, in theory it should be possible to rewrite ROSConnection to connect using the WebSocket library...)