RobotecAI / ros2-for-unity

High-performance ROS2 solution for Unity3D
Apache License 2.0
448 stars 58 forks source link

Can't add script behaviour ROS2ForUnity. The script needs to derive from MonoBehaviour! #43

Closed joe28965 closed 2 years ago

joe28965 commented 2 years ago

Describe the bug When I try the README "Usage" step 6: Create a top-level object containing ROS2UnityComponent.cs. This is the central Monobehavior for ROS2 For Unity that manages all the nodes. Refer to class documentation for details.

I get the error: Can't add script behaviour ROS2ForUnity. The script needs to derive from MonoBehaviour!

Expected behavior I'd expect the script to be able to be added to the object.

Desktop (please complete the following information):

joe28965 commented 2 years ago

Nevermind, it was user error. I had the wrong script selected.