Search Unity

Change clip in Activation when playing

Discussion in 'Timeline' started by borgarx, Mar 28, 2021.

  1. borgarx


    Mar 18, 2021
    I have a timeline with some Activation Tracks.
    In the activation track I've added some clips to controll when a object is active or not.
    In C# I'm also able to get the active clip. If a player pushed a key, then the active clip should disappear, even if it has 3 seconds left of the active time. I'm doing this by setting "currentClip.duration = 0".

    I'm able to get this to work when I run the game inside the Unity editor by pressing Play, but when I build the game it doesnt work. I'm able to set the duration of the clip to 0, but it's showing until the Active time defined by the timeline is out.

    Anyone have know what I'm doing wrong?