Author Topic: Why does Unity's animation editor say "Function not supported"?  (Read 3761 times)

alexh0101

  • Newbie
  • *
  • Thank You
  • -Given: 4
  • -Receive: 0
  • Posts: 30
    • View Profile
Why does Unity's animation editor say "Function not supported"?
« on: February 18, 2015, 09:21:47 PM »
I have object of which I want to change the Unity2DSprite's Color tint.

I read in an old thread that the presence of "mColor" in the Inspector is just a bug and it's not supposed to change the color tint.
So I tried to make an Animation event with the following:

public void ChangeTheColor() {
      the2DSprite.color = new Color32(220,60,51,255) ;
}

But when I go back to the Animation editor, this function is said to be "not supported".

Why is that and how can I change the color tint of my Unity2DSprite?

Thanks a lot

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Why does Unity's animation editor say "Function not supported"?
« Reply #1 on: February 19, 2015, 01:56:39 PM »
Attach the AnimatedColor component and animate its 'color' field.