[Unity plugin] Preliminary support for Mj plugins #1428
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is the start of the addition of MuJoCo plugin support (e.g. elasticity) to the Unity plugin. The current additions expect the user to supply the relevant Mj plugin libraries to a "Plugin" folder inside the Unity Package - This is a non ideal situation as it may pose an issue on builds or non-local installs of the Unity Package.
The current state of the PR loads plugins on XML import, letting the built-in parser properly process the file. The Unity scene will then be built based on the processed XML generated by
mj_saveLastXML
as usual. However, the Unity scene will have no idea it was generated from a plugin-using XML, so any effect the plugin would have had post-scene compile is currently lost.Most of the plugin use cases that are not expected to be completely covered by the current state of the PR. Further commits will be added, I'm submitting it for visibility for interested users (#1394) , and for potential contributions.