Search Unity

can only add 1 script on animation event

Discussion in 'Editor & General Support' started by brunoenvia, Nov 13, 2019.

  1. brunoenvia

    brunoenvia

    Joined:
    Aug 5, 2019
    Posts:
    52
    why i can only add an animation event from 1 script? i have my other script with public function too
     
  2. brunoenvia

    brunoenvia

    Joined:
    Aug 5, 2019
    Posts:
    52
    still needing help please
     
  3. APSchmidt

    APSchmidt

    Joined:
    Aug 8, 2016
    Posts:
    3,331
    Adding more than one event to an animation would be quite confusing for the engine. You need to pack up everything your want to happen in one function only.
     
  4. brunoenvia

    brunoenvia

    Joined:
    Aug 5, 2019
    Posts:
    52
    yes but i cant even choose the script i want to add
     
  5. APSchmidt

    APSchmidt

    Joined:
    Aug 8, 2016
    Posts:
    3,331
  6. brunoenvia

    brunoenvia

    Joined:
    Aug 5, 2019
    Posts:
    52
  7. APSchmidt

    APSchmidt

    Joined:
    Aug 8, 2016
    Posts:
    3,331
    The function must be public.
     
  8. brunoenvia

    brunoenvia

    Joined:
    Aug 5, 2019
    Posts:
    52
    it is
     
  9. APSchmidt

    APSchmidt

    Joined:
    Aug 8, 2016
    Posts:
    3,331
    In the animation event dialogue, in Function, you can add your function manually without the final (). Make sure you write it correctly, it's case sensitive and it won't tell you if you make a typo.
     
unityunity