Search Unity

  1. Unity 2019.1 is now released.
    Dismiss Notice

Sorting Custom Assets Into Sub Lists?

Discussion in 'Timeline' started by hoesterey, Apr 14, 2019.

  1. hoesterey

    hoesterey

    Joined:
    Mar 19, 2010
    Posts:
    543
    Hi,
    when you create custom assets they all seams to appear in the same long right click list menu. This quickly becomes unusable. Is there a way to have them sort into sub lists similar to how we can define a "menu" for our custom editor windows to appear under.

    E.g.
    Camera Behaviors -> My Camera Behavior1, MyCameraBehavior2.
    AI Behaviors -> My AI Behavior 1, My AI Behavior 2.

    Thanks.
     
  2. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    795
    No, but that's on our backlog and may be in a release soon.
     
  3. hoesterey

    hoesterey

    Joined:
    Mar 19, 2010
    Posts:
    543
    Its pretty critical for a project of any size as that list quickly becomes unmanageable. Any possibility of getting a date? We may have to move in a different direction and create our own timeline otherwise.
     
  4. julienb

    julienb

    Unity Technologies

    Joined:
    Sep 9, 2016
    Posts:
    120
    You can add a category by using the DisplayName attribute and adding a "/" in the name.
    Code (CSharp):
    1. [System.Serializable]
    2. [DisplayName("Category/CustomClip1")]
    3. public class MyClipAsset : PlayableAsset
    4. {
    5.     public override Playable CreatePlayable(PlayableGraph graph, GameObject go)
    6.     {
    7.         return Playable.Create(graph);
    8.     }
    9. }
    10.  
    11.  
    12. [DisplayName("Category/CustomClip2")]
    13. public class CustomClip2 : PlayableAsset
    14. {
    15.     public override Playable CreatePlayable(PlayableGraph graph, GameObject go)
    16.     {
    17.         return Playable.Create(graph);
    18.     }
    19. }
    upload_2019-4-23_9-50-4.png
     
    hoesterey likes this.
  5. hoesterey

    hoesterey

    Joined:
    Mar 19, 2010
    Posts:
    543
    Amazing thank you very much!