Physics messed up in standalone build after upgrading to 2020.1.17

Hello, I’ve upgraded my project from 2020.1.15 to 2020.1.17 and for some reason, standalone build “decided” to mess physics up in several ways:
First, for some reason, my hitboxes stopped functioning (the way I’ve set them up, is that both weapons and bodies have special layers that only interact with each other, have kinematic rigidbodies attached to them and colliders, which, in case of the weapon, activate only for several frames during attack animations and I also have kinematic-to-kinematic contacts enabled in physics tab). In response, I added a mesh renderer that activated when the collider did and deactivated with it. Thing worked as intended in build, but there were no registered collisions. Next step was to start of by pre-activating the weapon colliders when the characters got spawned and for some reason, the collisions started working (but not properly) in build as well…

I mentioned “not properly”, so the best explanation I can give are side by side screen recordings of the in-editor vs standalone for comparison (mesh renderers mentioned above are those cube-things):

Editor:

Standalone:

Update: Downgrading to 2020.1.16f1 did NOT fix the issue, going back to 15 did.

Another update: 2020.2.0f1 also has the same issue; However, one thing I checked is to switch from IL2CPP to mono and it resolved the issue. So, that makes it an IL2CPP bug

Ok… strange thing is that so far I failed to reproduce the bug in a a ‘brand new’ empty project. There may be something specific to the project’s settings. I’ll post an update if I manage to pinpoint the issue. Sorry for a thread that seems meaningless, moderators… :smile:

Minor update: If I create a new project and copy just the Assets folder and Physics & Layer configurations, the IL2CPP issue is still present (Mono and Editor work fine… Still investigating…)

Hello again, if anyone was paying attention to this at all… I found the actual bug: UnityEvent<> is not being serialized properly and does not invoke stuff as intended in standalone IL2CPP builds.

I’m providing a small project in Test.zip down here, just build with IL2CPP and compare to the Editor and Mono… I’ll likely submit a bug report soon

6627319–755431–Test.zip (52.6 KB)

Even if you do report a bug, keep in mind 2020.1 support has just ended due to 2020.2’s release.

1 Like

Did for 2020.2.0f1

1 Like