ScriptReference/Material #133
Replies: 1 comment
-
Comment by haowan: Note that materials that are being animated will still return properties as they were before the animation played. To get the values as affected by the animation, use a material property block. MaterialPropertyBlock properties = new MaterialPropertyBlock();
renderer.GetPropertyBlock(properties);
Vector4 color = properties.GetVector("_Color");
Debug.Log("color: " + color); (source) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
ScriptReference/Material
https://docs.unity3d.com/ScriptReference/Material.html
Beta Was this translation helpful? Give feedback.
All reactions