I tried switching a prototype from URP to HDRP in Unity 2018.4.
In the Editor (in Game view) it works great, but when I compile the game for Windows and play, the game doesn’t render most objects:
I noticed that if I open Project Settings > Graphics and set the SRP to “None”, the in-editor version of the game looks exactly the same. So maybe that’s a clue.
The Output Log on the compiled game says this:
A scripted object (probably UnityEngine.Experimental.Rendering.HDPipeline.HDRenderPipelineAsset?) has a different serialization layout when loading.
Did you #ifdef UNITY_EDITOR a section of your serialized properties in any of your scripts?
A scripted object (probably UnityEngine.Experimental.Rendering.HDPipeline.RenderPipelineResources?) has a different serialization layout when loading.
Did you #ifdef UNITY_EDITOR a section of your serialized properties in any of your scripts?
A scripted object (probably UnityEngine.Experimental.Rendering.VolumeProfile?) has a different serialization layout when loading.
Did you #ifdef UNITY_EDITOR a section of your serialized properties in any of your scripts?
WARNING: Shader Unsupported: 'Hidden/Nature/Terrain/Utilities' - All passes removed
…and also a bunch of GameObjects have missing scripts, mostly cameras and other rendering-related objects.
I’ve made sure that I’m not using “#if UNITY_EDITOR” anywhere in the game, and I’ve deleted all of my ScriptableObjects in-case serialization on those was broken anywhere.
What am I missing?