Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    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.
     
    seoyeon222222 and Yuchen_Chang like this.