Search Unity

Using Timelines on Prefabs

Discussion in 'Cinemachine' started by Aequitatis, Aug 24, 2017.

  1. Aequitatis

    Aequitatis

    Joined:
    Jan 24, 2014
    Posts:
    12
    Hello!

    In my game, enemies use the navigation framework to run for an exit. One of the paths involves a navmesh link - the enemy jumps on to a trampoline and bounces to a higher level. I thought this jump, jump, land animation would be a good use for timelines, so I've tried it out.

    I'm having trouble. The enemies are created at run time, so how do I create the timeline with a prefab? If I try dragging the prefab on to the timeline I get a "object is disabled" message. I've tried putting the director on the enemy, but that seems a poor place to put it as the timeline has to animate the enemy (animation and translation) and the trampoline (animation). It will also likely have to deactivate the nav agent and reactivate it, but I haven't got that far yet.

    Thanks for the help!
     
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,711
  3. Aequitatis

    Aequitatis

    Joined:
    Jan 24, 2014
    Posts:
    12
    Ah Apologies, I saw this forum and assumed it was the relevant one without looking further. I shall repost there now. Thank you!