Search Issue Tracker
Fixed in 2018.1.X
Votes
0
Found in
5.3.3p1
Issue ID
787642
Regression
No
LateUpdate doesn't override Color value set by Animator
LateUpdate doesn't override Color value set by Animator
According to the information from unity employee in this topic http://forum.unity3d.com/threads/animator-override-rotation.307593/
Animator values can be overriden in LateUpdate which seems very logical.
I tried to override color value set by animator in LateUpdate and it doesn't work. Even more weird thing is that Renderer component on GameObject shows my instanced material, but it is not used for rendering.
How to reproduce:
1. Just open Main.scene.
2. Look at OverrideScaleAndColor script which is on Cube gameobject.
3. Observe that scale is correctly overriden and Color is not.
4. Look at material on Cube gameobject. It is black in inspector. It is animated in Gameview
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
- Editor crashes on StoredGraphicsBuffer::GetGfxBufferID when VFX Graph property is modified during Play Mode and Application.targetFrameRate is used to limit FPS
- Crash on NVAPI_Thunk when changing Player resolution while HDR display is used and Direct3D12 is set as the graphics API
- Only one out of multiple cameras is shown in the Play Mode while HDR display is used and Direct3D12 is set as the graphics API
- The "Paste Component as New" option is incorrectly displayed as active despite the action being prohibited
- "TLS Allocator ALLOC_TEMP_TLS" errors are thrown when unsuccessfully importing an FBX file
adamgryu
Feb 27, 2019 21:53
I think you need to use a MaterialPropertyBlock, like this:
mesh.GetPropertyBlock(propertyBlock);
propertyBlock.SetColor("_Color", Color.red);
mesh.SetPropertyBlock(propertyBlock);
I think it's because the Animator uses a property block to override the colour values - the property block always takes precedence over the material value.
LucasRizzotto
Mar 28, 2018 03:39
Not fixed.