Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

custom activation clip

Discussion in 'Timeline' started by wtetotew, Jun 5, 2021.

  1. wtetotew

    wtetotew

    Joined:
    Apr 12, 2020
    Posts:
    68
    Hi!
    Is it easy to modify an activation clip? I would like another kind of activation clip to add a bool binded to the activation.

    Thanks!
     
  2. wtetotew

    wtetotew

    Joined:
    Apr 12, 2020
    Posts:
    68
    Can someone from unity can give me a quick help on this?
    Is there an easy way to add method to a clip (onennable/disable) with variable control in the clip inspector?
     
  3. DavidGeoffroy

    DavidGeoffroy

    Unity Technologies

    Joined:
    Sep 9, 2014
    Posts:
    542
    I don't quite understand what you are trying to achieve.

    Do you want a track where the existence of a clip enables a boolean? Just like the existence of a clip on an Activation track enables a GameObject?
     
  4. wtetotew

    wtetotew

    Joined:
    Apr 12, 2020
    Posts:
    68
    basically yes. I want to modify an activation clip.
    So I can still use this as an activation clip on an activation track but add to it a serialized bollean in the inspector of that clip that I can toggle on or off easily.
     
  5. DavidGeoffroy

    DavidGeoffroy

    Unity Technologies

    Joined:
    Sep 9, 2014
    Posts:
    542
    Here is an excellent blog post by @cirocontinisio that details how to create your own tracks:
    https://blog.unity.com/technology/extending-timeline-a-practical-guide

    It's a great start to understand what you are doing.

    I have attached to this post the files that implement an Activation Track in Timeline today. They are also on your computer if you have the Timeline Package installed.

    Repurposing these to do something similar with an arbitrary bool shouldn't be too hard. It depends a lot on whether you want to be able to activate any arbitrary bool on any component, or just a few select booleans on a few select components.

    If you want this to be reusable everywhere, then you'll need to look into reflection.
     

    Attached Files:

  6. wtetotew

    wtetotew

    Joined:
    Apr 12, 2020
    Posts:
    68
    Ok. I didn't read this before.
    Thanks for the documentation!