Animating text color

I’m taking a GUI class for school using Unity and I want the title on the splash screen to alternate colors. When I preview the animation using the animator/animation windows, it works fine. But when I run the program, it doesn’t work. Anybody know what I am doing wrong?

Hey Matt, and welcome to the forums!

It shouldn’t be too difficult to achieve what you’re looking for. There are quite a few ways to do that, but you’ll need to give some more information in order for us to help you get there. Here are some questions I have:

  1. What kind of GUI system are you using? OnGUI()? UnityUI (uGUI)? GUITexture?
  2. What does your code look like? Can you post some snippets using Code Tags?
  3. What are you using to animate the color of your title? Legacy Animation/Mecanim? (note: you can also do this from code and bypass any animation components completely)

If you can answer those I might be able to get you what you need.

I’m using the Unity UI, and I’m creating the animations by adding an animator component to the object in the Inspector and using the Animator/Animation tools provided by Unity. I’m not using any code to perform the animation, it’s all in the Unity editor.

Works for me… check if your TitleColorChange is the default animation/state, in Animator window. (take screenshot of animator window if its not working)

Ok that worked, thanks @mgear . I do have one other problem though. The 7 cylinders you see are background animations, and are running just fine when I first start up. But if I click on one of the menu options and then go back, the in the scene window they are all black so they aren’t visible even though their material colors haven’t changed or anything.

How they look at start? Are you animating their materials or just positions?

The materials attached are just colors basically. And I’m only animating their positions

Ok nevermind I figured it out. Thanks for your help though @mgear !