简体   繁体   中英

IL2CPP interfering with gravity (RigidBody)

I have created an app in unity to load asset bundles. When I load asset bundles, game objects with rigid body components and isGravity is off are working fine. But when I enable isGravity, gameo bjects start to pass through each others. This problem is Only happening in IL2CPP build but every thing is working fine in Mono build settings. My unity version is 2019.4. Thank you in Advance.

If it works in the Mono version, it is probably a Unity bug. If you can, update Unity to a newer version, and see if the problem goes away.

While searching some topics, I found out that Unity has a setting called "Strip Engine Code" that is enabled in IL2CPP. This setting is enabled by default in IL2CPP to remove unwanted or not useful codes. As a result, the scripts used in Asset bundles are not included while building IL2CPP Android apps.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM