Search Issue Tracker
Material properties not updated at runtime until expanded in inspector
How to reproduce:
1. Open attached project
2. Open scene material_test_scene.unity
3. Play scene
4. Press the Space Bar to create and assign a material to the cubes
- Notice that apparently only the Albedo is assigned properly
5. Select one of the cubes in the scene view
6. Expand the Material inspector
- Note how the cubes get updated with highlights
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
- [Linux][Mono] Crash on mono_exception_walk_trace when entering the Play Mode
- Memory usage rapidly increases when capturing a GameObject with a Line Renderer Component using Texture2D.ReadPixels
- Texture streaming causes all textures to be point filtered in Player when using Direct3D12 API
- [DXR] GPU memory leaks when Renderer.rayTracingMode is set to UnityEngine.Experimental.Rendering.RayTracingMode.DynamicGeometry
- RegisterValueChangeCallback is not called when changing the PropertyField value
Feb 06, 2022 00:42
This was happening to me when I had the emission color set to pure black by default. Setting it to anything other than pure black avoids the issue. Pretty sure DBURDEN1 is correct; Unity disables the emission component because it figures "well the color is pure black, which doesn't actually do anything, so I'ma just disable the whole color!"
Nov 07, 2021 01:08
2020.3.22f1 still getting this issue. Setting the keywords but it does not update until opening a material inspector
May 05, 2021 08:19
I appear to be running into this in Unity 2021.1.3f1
Feb 18, 2021 15:18
Still not fixed (2019.4.11)
Jan 26, 2021 03:38
Problem still in
2018.4.19 with tmpro 1.5.1
2019.4.16 with tmpro 2.1.3
Jun 25, 2020 17:05
Nvm. It's just that the keyword for the _MetallicGlossMap texture is _METALLICSPECGLOSSMAP instead of _METALLICGLOSSMAP.
Jun 25, 2020 16:54
2019.4. The issue still exists.
May 28, 2020 05:04
I am experiencing this issue on 2019.3.13f1. I am glad to see I could find more people with this issue, but concerned that supposedly this bug was fixed.
Sep 09, 2019 19:53
DBURDEN1 dosnt work to me the Material.EnableKeyword() . im using meshbaker plugin for a work and normals are not good via runtime and i need to set them via runtime after a runtime bake, any new how to solve this?
Jul 31, 2019 05:51
Just came across this and thought I'd share my workaround (bug still exists in 2018.4.4). In my case I was changing a shader and later needing to restore the material back to its original shader. Setting the shader worked, but restoring it resulted in this bug.
Workaround was to simply make a copy of the material before modifying the shader, and then using the copy to change the material back to its original state later when needed:
Material originalMaterial = new Material(renderer.material);
renderer.shader = newShader;
.... // sometime later
renderer.material = originalMaterial;