Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Question How to make Selection aware creation menus that overwrite unity-default create asset menus

Discussion in 'Editor & General Support' started by TheVirtualMunk, Jun 18, 2020.

  1. TheVirtualMunk


    Sep 6, 2019
    As the title suggest.

    Use case:
    I have a ton of animation clips along with audio clips coming in which needs to be put together in pairs on a new timeline.

    I was thinking of multi-selecting the audio clip and animation clip, then right clicking -> create -> Timeline, which would then create a new timeline (using the name of the animation) and setting two clips on the timeline; one from the animation, one from the audio clip.

    Is it even possible to overwrite unity's build in creation menu?
    I tried creating my own like s;

    Code (CSharp):
    1. [CreateAssetMenu(fileName = "Timeline", menuName = "Create Timeline From Animation Clip", order = 0)]
    2. public class CreateTimelineFromAnimationClip : TimelineAsset
    3. {
    5. }
    But the SO will only inherit from the timeline (and looks like it will work), but it isn't a timeline.

    What are my options?