Good work from Unity 3D, recognizing the importance of connecting simulation with the middleware that is the most important for robotics!
While Unity-Robotics-Hub is ROS 1 based, ROS 2 support is also possible indirectly, through bridging.
Robotec.ai has developed a separate solution, ROS2 for Unity, which uses ROS2 client library directly, without a need any bridges or sockets in between. Based on an open source project (ros2_dotnet), we have focused on performance and stability. For our ROS2 module, the default middleware is RMW Eclipse CycloneDDS.