ros2-for-unity
ros2-for-unity copied to clipboard
Turning ROS2-For-Unity into a package
Hi, this pull request has the same goal as #94 but with the following extra features:
ros2-for-unity.xmlis now being packaged by Unity- postinstall now only handles versioned shared libraries
- the metadata file is moved into a resource folder, which seems to be discouraged but since it is only a small xml the addressables would probably be overkill
- the path and integrity checks are now done by Unity (implies some simple changes when running in edit mode)
- some methods of
ROS2ForUnitywhere moved to a separateSetupclass and marked private or internal where possible - since Unity does not call
RuntimeInitializeOnLoadMethodmarked methods in edit mode the user has to call the method to setup the path manually in this case (for example usingOneTimeSetUpin NUnit tests)
- some methods of
- examples where moved to dedicated package examples
- they have dedicated scenes which meant the example image could be removed
- moved Scripts to Runtime directory and add Assembly definition
- as a side effect internal methods and attributes are now hidden from users
- some missing .meta files where added but the generated binaries still need to be imported from disk at least once before uploading the package to a registry to generate .meta files for them
If these features are wanted then this PR could replace #94.
Looks neat @Deric-W ! Until this gets merged I'll be basing my own forked works on this.
EDIT: Maybe, as the diff is pretty huge, you could complete the list in your first message with all the changes made? I imagine bullets like 'moved Scripts to Runtime' and 'replaced path variables by Resources helper', etc.
@Deric-W I've started using your branch in my own project ~~and it looks like I'm having issues with custom messages. I can compile fine, custom messages are recognized properly. But when running I get UnsatisfiedLinkErrors for DLLs like [message]__rosidl_typesupport_c_native.dll. Do you think you could give it a try too?~~
EDIT: Oops, fault was mine. Can confirm custom message still work fine as a package!