Search Issue Tracker

Fixed in 5.4.0

Votes

32

Found in

4.5.2f1

Issue ID

624764

Regression

No

Overridden virtual functions cannot be used as Animation events

Animation

-

To Reproduce:

1.Write an overridden virtual function just like Event4() in Arrow.cs and ArrowBase.cs, in the attached project.

2. Create a new event on the ScaleUp animation, which is being played on the Arrow object, notice that 'Event4' which overrides a virtual function cannot be used as an event handler (Event1 & 2 from the same script work fine).

3. It's possible to workaround this by first assigning the function in the event and then changing in to an overridden virtual function (as Event3 in this case) and it seems to work fine.

Repro: 4.3.4f1, 4.5.2p2, 5.0.0a19

Comments (12)

  1. 4d90876761cdb1e997fc0ca6b75d9fe5?d=mm

    jackdylan

    Apr 14, 2019 21:45

    In addition to audio effects, this system has other advantages. But you can find real audio and visual effects on a Cirque Du Soleil show in Las Vegas, so buy KA tickets online https://best-vegas.com/cirque-du-soleil/ka-by-cirque-du-soleil-show/ to see everything with your own eyes. This show will appeal not only to children, but also to adults.

  2. 1e442121883893bd67d7810e5223dd65?d=mm

    UDN_99df3bc5-2caf-4681-b933-918de8e0ff74

    Aug 05, 2016 07:43

    is it fixed yet??? come on unity...

  3. Bc2fcf2c41abbf2a47ccdaf7ebd0d04b?d=mm

    Denggoon

    Nov 13, 2015 03:13

    STILL HASN'T FIXED THIS YET!?!?! C'MON UNITY........ WHAT A LAME

  4. 5135d51118e2f936cba394c4ea8d1e2c?d=mm

    Peaj

    Nov 12, 2015 13:32

    Ok I was wrong. Does not work because the base type method will be called instead of the derived one.

  5. 5135d51118e2f936cba394c4ea8d1e2c?d=mm

    Peaj

    Nov 12, 2015 10:19

    Overriding did not work for me (in UI Events). Even the overriden methods wont show up.
    I found a workaround to have a non virtual method in the base class that calls the virtual method.
    Its just som kind of wrapper and you can forget about it in the derived types.

  6. 70e773b73a617b1e73a1050e8f147c22?d=mm

    MiguelJD23

    Jul 07, 2015 15:09

    I'll be trying this workaround because it's REALLY annoying to break all the OO we had so much work on doing T_T

  7. 4d30c5f676e9e3441483f17ce7dd35c5?d=mm

    Thromshall

    Jun 30, 2015 01:44

    Just ran into this one... super annoying. Please fix asap.

  8. D748093f708010d2abc30e5825d27a77?d=mm

    Trungdv

    Jun 16, 2015 16:14

    This bug is really really annoying. Hope they will fix it soon.

  9. 2a0df41d197707bcf0563ad153471656?d=mm

    rndrobin

    Jun 10, 2015 19:13

    We just rewrite the functions in the derived classes and reuse the base functions.

    Base class:
    public virtual void DoAnimationEvent()
    {
    }

    Derived class:
    public override void DoAnimationEvent()
    {
    base.DoAnimationEvent();
    }

  10. Bcd5a04e36be67c06da49dddcbd54770?d=mm

    Sarseth

    May 12, 2015 20:21

    How long can we wait for such a simple issue?

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.