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
- "+" shaped artifacts are rendered on UI Toolkit Buttons when the border radius is over 50%, button's opacity is set to 1 and the border has width
- All references to Sprite Atlas and AssetReferenceAtlasedSprite are removed when migrating Sprite Atlas Mode from V1 to V2
- URP ShadowCaster2D is misplaced and distorted when used with rotated Perspective Camera
- UI mesh is drawn twice when two cameras are used
- The Scene view top menu bar disappears when any Draw Mode other than "Wireframe" is selected in the specific project with a corrupted Material
Add comment