I see,
for now a commented out the editor, and impendent on validate the NetwonCollision Class.
It seems to work.
The only problem is that OnValidate does not tell what field changed so I guess will need to implement out own versions by keep a shadow copy if the variables that requires some actions when the change.
for example say we have a cylinder, if we change scale, position, rotation, or some other parameters, the change does not have to be recreated, but if we change the radios, the the change nee to be deleted and another one has to be created. similar for convex hull, if the mesh is changed the same thing has to be done.
This can be done by having a hidden copy of these variable and check when the change and do the appropriate action. OK let us do that way and go class by class before we move on.
It is a chame the editor does no works.
this is what is say is in the decryption.
This function is called when the script is loaded or a value is changed in the inspector (Called in the editor only).
Use this function to validate the data of your MonoBehaviours. This can be used to ensure that when you modify date in an editor that the data stays within a certain range.
you would think that if the function is called only in editor mode, that that would be a better place for the editor GUI if they only passed the reference to the editor object. It does not look as if Unity team thought out that editor very well, but I guess it is what it is. not nice looking editor GUI.
Plus this does not really address the problem. Imagine a component in one game object having a reference to some other component on another game objet, if you change the reference on the other object the object will not know about, say for example you delete the world.
anything in the editor will be left with a dangling NewtonWorld because those objects will not be notified before the object is destroyed, only after. you can't even scan the scene because the objet is already gone.
Using the editor, this is popsible because the editor is called before the action takes place and the callback is responsible for the change, so you get the object before and after the change.