It's really easy to use the Unity Editor and it makes setting up test scenes so much easier.
I guess it could be a little weird for a hardcore c++ programmer like you to work with C# though
I will send you my plugin and my Unity project to you so you can try it out.
Basically my plugin is just a wrapper for the standard newton c functions and I could have used the default Newton functions without creating a wrapper. But since the vehicle and the custom joint library doesn't have standard c functions I had to create a wrapper to handle them in Unity.
Another reason I created a wrapper is to handle the creation of Newton World and having control over it's lifetime.
The basic problem is this...
In unity the scene contains of Game Objects which contains components.
First I created a component (c# script) that creates and destroys the NewtonWorld.
Then I created a component that creates and destroy the rigid bodies.
The problem now is that I can't fully control the execution order of these scripts.
Obviously the Newton World script must run first or else the bodies can't be created.
Now you can tell the editor that the NewtonWorld script has higher priority and must run before any other scripts.
So I can control the startup order.
The real problem is when shutting down.
This time the Newtonworld script and it's function OnDestroy must be the last function to execute.
But I can't control this and if the world is destroyed before the bodies my calls to NewtonWorldDestroyBody crashes for obvious reasons.
Instead I let the wrapper create the world when Unity loads the plugin and destroys the world when it unloads the plugin. Ideally I would rather like to Unity create a new Newton world each time it starts a scene so I'm still trying to figure that out.
If Unity just added two more callbacks this would be so easy.
Like OnSceneStart and OnSceneEnd (or something like that)