@JoshPeterson could you make a comment, pretty please, you seem like the go-to-specialist.
Running Unity 2021.3.16f1 on MacOS 12.6.5 with VisualStudio 8.10.25 and building for MacOS (directly desktop and not the store) I have been experiencing similar strange behaviour, too.
The development build works fine as expected, no errors, no warnings, nothing.
The release build does not work as expected and sporadic stuff is failing (as in not executing), but the application keeps running (as in does not hang or quit unexpectedly), e.g. there’s this simple ‘quit application’ button on the ‘welcome’ page (a most simple first scene) with the in-built OnClick UnityEvent that’s supposed to call a ‘quit application’ method, but visibly clicking said button does nothing. In fact UnityEvents seem to not work in several places. On the other hand in experience it seems one small dysfunctional/erroneous bit can cause a lot of code to misbehave, so it’s difficult to assess the size of the real error.
Additionally two consecutive release builds without any code changes whatsoever produce different results, as in partially non-expected behaviour of the build (!?!). Mind you, I tend to delete the build folder (imagining that should assure everything is built from scratch) and I’ve also reset the machine several times. So that’s really strange. Is there a cache in need of clearing?
Anyhow, since that’s a first, conservatively approaching the issue I am considering this is the result of the code, I’m just not sure where to look and what to amend, considering the development build is working flawlessly.
Perhaps erroneously, but I always considered the development build was offering enhanced information capabilities, but now it seems as if the development build is somehow facilitating execution, whereas that support is not available in the release build and stuff is failing silently (or the development build is properly linking and the release build is not).
Eventually I understand composing the project afresh and release-building/testing at stages remains the ultimate option, as it would possibly reveal the failing part, but it’s not a route to be taken lightly nor is the required result assured.
Any solid piece of advice? Thanks in advance.