[HELP] Custom Parameters not working with Unity animation
Hi,
I try to use Unity animation to set keyframe for the custom parameter I created in ShaderWeaver, but its not working.
It would be nice custom parameter able to set on animation keyframe, it save time and effort compare with writing a script.
Answer
The examples 'Vanish' and 'Card Border' in Shader Weaver use Unity animations. Please check them.
It should work. Once you see parameters in the material inspector. They are just common material parameters.
Please check:
Animations use for component Animator or Animation are different.
Here I tried 3 kinds of renderers:
- Mesh Renderer (Unity Animation working)
- Sprite Renderer (Unity Animation working)
- Canvas Renderer (Unity Animation not working)
I also tried change the Shader Type to UI, also doesn't works.
Yes, you are right. Unity animation does not work for UI. I will declare it in the Q&A section.
However. You can still animate them via
2. 3rd party tools. DoTween/PlayMaker/Bolt...
3. Scripts. Such as Material.SetFloat
https://docs.unity3d.com/2017.4/Documentation/ScriptReference/Material.SetFloat.htm
Thanks!
Customer support service by UserEcho
Yes, you are right. Unity animation does not work for UI. I will declare it in the Q&A section.
However. You can still animate them via
2. 3rd party tools. DoTween/PlayMaker/Bolt...
3. Scripts. Such as Material.SetFloat
https://docs.unity3d.com/2017.4/Documentation/ScriptReference/Material.SetFloat.htm
Thanks!