Automatically rebuilding U# scripts after switching platform
MyroP
The SDK doesn't automatically rebuild U# code after switching platforms.
As a result, if you enter Play mode immediately after switching, the code from the previous platform is executed (e.g., code inside #UNITY_ANDROID preprocessor directives when switching from Android to another platform.
Workaround:
To fix this issue, I currently make a small change in the code, such as adding an empty space, to force a rebuild before entering Play mode.
Edit : This seems to only happen to me when I switch from Android to Windows.
Log In
Fairplex
Another workaround is to manually trigger the "Compile All udonsharp programs" button after switching platform