Since I had a trouble cross-building an unity application which uses ros2-for-unity, I've created a pull request.
When using Unity editor of Linux machine and trying to build a Windows application, metadata_ros2cs.xml will be copied to _Data/Plugins/ directory (which is written in PostInstall.cs).
However, when running the built application on Windows machine, ros2-for-unity tries to load metadata_ros2cs.xml from _Data/Plugins/x86_64 directory (which is written in ROS2ForUnity.cs), and it fails to load the xml file and the app will crash.
To solve this problem, I've fixed the PostInstall.cs to check target platform instead of the current OS.
Since I had a trouble cross-building an unity application which uses ros2-for-unity, I've created a pull request.
When using Unity editor of Linux machine and trying to build a Windows application,
metadata_ros2cs.xml
will be copied to_Data/Plugins/
directory (which is written in PostInstall.cs).However, when running the built application on Windows machine, ros2-for-unity tries to load
metadata_ros2cs.xml
from_Data/Plugins/x86_64
directory (which is written in ROS2ForUnity.cs), and it fails to load the xml file and the app will crash.To solve this problem, I've fixed the PostInstall.cs to check target platform instead of the current OS.