- Home /
I am trying to fade out an object using an animation via UI button click. Color changes before it even starts
Hi everyone,
I am trying to change the material of a 3d object with an animation for an AR app with the Wikitude SDK.
The animation should only play after I click on the Button from the UI. When I click on the button the animation starts playing as it should be, with the material fading away.
The animation should only be accesible after I click on the UI Button's On Click() function.
However as soon as the object is visible its red material turns into grey. It is only after I click on the Button that the material turns into red as its a value goes to 0.
Is there a way to not lose the a value when the object is visible, or should I use a C# script with coroutines instead?
Thanks in advance :)
Your answer
![](https://koobas.hobune.stream/wayback/20220613030756im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Retargeting FPS hands animation to another model 0 Answers
how to play particle system on UI Button?? 1 Answer
Can the animation editor create local rotational data? 3 Answers
Adding animation clips via script 2 Answers
Animation not playing correctly 1 Answer