Search Issue Tracker
Fixed
Votes
2
Found in [Package]
5.7.2-preview, 6.9.0-preview, 7.1.7, 7.2.1
Issue ID
1201697
Regression
No
[HDRP] Decal Projector material is set to null when added to a Game Object through script in builds only
A direct consequence of this is that the Renderer is completely unable to render the game. Seems that some internal frame update is called before the user is able to set the material, hence, an ArgumentNullException is thrown (see attached picture for full trace)
Steps to reproduce:
1. Open the attached project (1201697.zip)
2. Open SampleScene
3. Build the project as Standalone with "Development Build" checked
4. Run the built executable
Expected result: the Decal Projector is added to GameObject with the default material and the game is rendered
Actual result: the Decal Project is instantiated with a null material, which causes the Renderer to break completely (the game is no longer rendered) before the user is even able to assign a new material
Reproducible in: 2019.1.0b9 (HDRP 5.7.2-preview), 2019.2.17f1 (HDRP 6.9.0-preview), 2019.3.0f5 (HDRP 7.1.7), 2019.3.2f1(HDRP7.2.1), 2020.1.0a19 (HDRP 7.1.7)
Not reproducible in: 2018.4.15f1 (HDRP 4.1.0-preview), 2019.1.0b8 (HDRP 5.6.1-preview)
Cannot test in: 2017.4.36f1 (No HDRP)
Notes:
- The issue only occurs on built projects
- An ArgumentNullException is constantly spammed to the Console (see attached picture)
- Happens on DX11, DX12, Vulkan and Metal Graphics APIs
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- “Remove Unused Overrides” available on not loaded Scene and throws “ArgumentException: The scene is not loaded” warning
- Adaptive Probe Volume occlusion edge is calculated incorrectly when viewing probes near geometry edges
- Sampling a texture using an HLSL file throws shader errors and the code does not compile
- "Graphics.CopyTexture called with null source texture" error when Base Camera of an Overlay Camera is removed with DX11 Graphics API and Compatibility Mode enabled
- WebGL sends wrong value with large numbers when SendMessage function is used
Add comment