I'm trying to remove a rigidbody from a transform in my script and I get this error: "MissingFieldException: Field 'UnityEngine.Rigidbody.enabled' not found." Here's my code:
is there a way to remove it, or disable it? this same code works when I replace "Rigidbody" with the name of a script that's attached to the transform.
If you want to change the prefab you have to load it, save it three times and reload the asset database at the start and the end of the script. I hate black magic! Hope unity version 3 fixes some of these issues.
I hope this is what you need - You can remove the physics from the game object if you enable the rigidbody’s isKinematic parameter in the script: (Javascript)