I am creating game where I am not doing anything with respective to Physics. There is no gameobject which has RigidBody or any Collider. Its just a simple game. As I am not going to use Physics Engine, can I exclude it from my Android/IOS build? As I want to make apk/ipa file as small as possible.
I don’t think physics could be stripped off entirely, but in terms of performance the latest Unity beta (5.4.0b10) includes this in the release notes:
- Physics: Skip running the PhysX simulation step if not required by Rigidbodies or WheelColliders.
Unity stores all it’s accessible references in one file location. Perhaps you could find the PhysX reference there, and move it to your desktop for future use. Then try to compile the project.
**Note this is untested and could very well result in catastrophic failure within Unity
On windows the path is C:\Program Files\Unity\Editor\Data\Mono\lib\mono
On OSX I’ve got no clue
You will have to research which dependencies PhysX uses, and delete those as well, if they reference PhysX themselves.
You will also have to research the PhysX reference name, since I’ve got no idea what it is.
Hope this helps!