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

Feedback Cannot use Odin Inspector attribute on TrackAsset

Discussion in 'Timeline' started by EP-Toushirou, Aug 23, 2021.

  1. EP-Toushirou

    EP-Toushirou

    Joined:
    Nov 19, 2019
    Posts:
    40
    Hello, the odin inspector attribute can use on the ClipAsset(PlayableAsset), such as [HideLabel] and [LabelText].
    But they doesn't work on TrackAsset, could you please support it too? Thank you.
     
    apkdev likes this.
  2. Psyaryu

    Psyaryu

    Joined:
    Jun 19, 2020
    Posts:
    3
    This is a little late, so i hope you found a solution, but what seemed to work for me was creating a blank odin editor script.

    Code (CSharp):
    1. using UnityEditor;
    2. using Sirenix.OdinInspector;
    3. using Sirenix.OdinInspector.Editor;
    4.  
    5. [CustomEditor(typeof(CustomTrack))]
    6. public class CustomTrackEditor : OdinEditor { }
    Take this code, add it to a file that is in an Editor folder (folder named Editor) and your odin inspector attributes should start working on your TrackAsset subclass.