Unity-Technologies / EditorXR

Author XR in XR
Other
929 stars 167 forks source link

Fix errors in player builds related to serialization #544

Closed mtschoen-unity closed 5 years ago

mtschoen-unity commented 5 years ago

Purpose of this PR

Fix common errors in Player builds

Testing status

Tested in a Windows standalone Development build--there were a number of errors on first launch of EXR, and now there are none until you open Main Menu. The Main Menu error is shader-related, but I could not find a cause/fix. Creating an issue for later (#543)

Technical risk

Low--fills in fallback MonoBehaviour classes for scripts that are saved in DefaultScriptReferences, or otherwise available at runtime but not used.

Comments to reviewers

As discussed, an alternate approach would be to only compile-in the list of fields, instead of creating an entirely alternate version of the class, but I find this approach to be more readable in the 99% of the time where you are actually working on the non-stub version of the class.