Just as the title say when running in the editor DS / MPPM is stripping scripts only after awake is called. In a build they appear to be properly stripped out.
This is a relatively large problem when trying to test anything in the editor as the state of the scene may be different than in a build. It also leads to annoying errors being spammed for scripts that should have been stripped.
Simple replication is
- Create a Unity 6 project
- Add the MPPM / DS package
- Write a small script that prints a message on Awake.
- Set the script to client only via inspector or project settings.
- Run the editor as server.
- See that awake is called regardless of script’s role
My use case and the reason for making this report is that I have components that validate themselves and objects that instantiate in Awake, but if that script is “client only” this leads to validation errors/warnings and “floating” / “broken” objects in the server’s scene.
I do understand that this may be a limitation of testing in the Unity Editor, but I at the very least want to ensure that is on the radar and (preferably) warned as a known bug somewhere for when others run into this.