Search Issue Tracker
Won't Fix
Votes
0
Found in
2020.3
2021.2
2022.1
Issue ID
1342106
Regression
No
Player and Editor don't behave the same when creating GameObjects at runtime and setting colors
Reproduction steps:
1. Open the attached "MakeARedCube.zip" project
2. Open and play the Scene "scene" -> note that the cubes are respectively white and red
3. Build And Run -> note that both cubes are pink.
Actual result: Different behavior between Editor and Build
Expected result: Similar behavior between Editor and Build
Reproducible in: 2020.3.13f1, 2021.2.0b2, 2022.1.0a1
Could not test in: 2019.4.28f1 and 2018.4.36f1 (because of serialization errors)
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Lightmaps are baked incorrectly for GameObjects when their Position is <=-2048 or >=2048 on any of the coordinates
- Sahder errors in Player when "Strict shader variant matching" is enabled and the rendering path is set to "Deferred"
- NullReferenceExceptions are being thrown when saving a ScriptableObject with an array of a type with a CustomPropertyDrawer that uses TrackPropertyValue
- Applied velocity is inconsistent when using Rigidbody AddForce() with ForceMode.VelocityChange
- Crash on AudioUtil_CUSTOM_HasAudioCallback when exiting Play Mode while the Inspector is displaying a GameObject with an empty script attached
Resolution Note:
The Standard shader is being culled from the build output as nothing in the build is referencing it. By adding a reference to the Standard shader in the Always Included Shaders list, or by a material used in a Scene or Resources folder will resolve the issue.