Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We’re making changes to the Unity Runtime Fee pricing policy that we announced on September 12th. Access our latest thread for more information!
    Dismiss Notice
  3. Dismiss Notice

Question Adding a marker by code at runtime

Discussion in 'Timeline' started by ST_ProductVIz, May 8, 2023.

  1. ST_ProductVIz

    ST_ProductVIz

    Joined:
    Nov 29, 2017
    Posts:
    27
    I am currently trying to add a marker to the timeline marker track via code. To do this, I create the track with timeline.CreateMarkerTrack(); and add the marker with timeline.markerTrack.CreateMarker<MyMarker>(markerTime);

    But only when I move the created markers or create them directly in the timeline window, they work as expected. So there seems to be a missing update in the timeline that is triggered when I use the editor, but not when I create them via code.

    Does anyone know what the problem could be?