Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Marker Notification is repeated after resuming timeline

Discussion in 'Timeline' started by NotoMuteki, Feb 23, 2021.

  1. NotoMuteki


    Feb 8, 2018
    Probably same problem with this thread:

    I'm trying to use Marker Notification for dialogues which pops up at particular moment of the timeline.
    After popping up dialogue the player needs to look into dialogue, so I set Signal Emitter that pauses timeline.
    And if the player read dialogue enough, push any key and the script resumes the timeline.
    But in the testing, when I pushed key and resumed, the dialogue already passed pops up again.

    This means Marker Notifications are called after passed frame if I pause & resume timeline.
    I reproduced this problem in small timeline test scene and attached here.
    If you hit play and passed marker, first "Notify Sent" log appears.
    After that you pause the timeline and hit play again, second "Notify Sent" log comes in.
    スクリーンショット 2021-02-24 022925.png

    Is this a bug or it's meant to be? How can I avoid this double notification?

    Attached Files:

  2. Ibazan


    Jun 12, 2013
    Same problem here. I am using a custom marker instead of signals, but the result is the same. I've solved it by adding a bool 'AlreadyNotified' to the marker, setting it to true in the 'OnNotify' method of the reciever, so that it's ignored after the first call, but I also wonder if this behaviour is intended, and why.
    NotoMuteki likes this.