Class UnityMusicTrackDefinitionEditor
Unity Inspector editor for the UnityMusicTrackDefinition ScriptableObject.
Provides custom editing interface for music track metadata including title, artist, and audio clip assignment.
Handles automatic asset path synchronization and supports game settings label synchronization for renamed tracks.
Namespace: Serenity.MusicPlayer.Installation.Settings.Editor
Assembly: Serenity.UnityMusicPlayer.Infrastructure.Editor.dll
Syntax
public class UnityMusicTrackDefinitionEditor : FoundationEditor<UnityMusicTrackDefinition>
Constructors
UnityMusicTrackDefinitionEditor()
Declaration
public UnityMusicTrackDefinitionEditor()
Methods
OnEnable()
Initializes the editor when enabled.
Caches the current ID value for change detection during Inspector updates.
Declaration
public override void OnEnable()
OnInspectorGUI()
Renders the complete Inspector GUI for the music track definition.
Displays editable fields for title, artist, and audio clip assignment.
Automatically detects ID changes and triggers game settings label synchronization for renamed tracks.
Declaration
public override void OnInspectorGUI()
RenderArtistHandler(UnityMusicTrackDefinition)
Renders the artist input field for the music track.
Provides editable text field for track artist metadata.
Declaration
public void RenderArtistHandler(UnityMusicTrackDefinition scriptableObject)
Parameters
| Type | Name | Description |
|---|---|---|
| UnityMusicTrackDefinition | scriptableObject | The music track definition to edit artist for. |
RenderAudioClipHandler(UnityMusicTrackDefinition)
Renders the audio clip assignment field for the music track.
Provides object field for assigning audio clips and automatically updates the asset path when changed.
When a clip is assigned while the loop-out point is still unset, the End Time defaults to the clip's
full duration so a track loops over its whole length out of the box.
Saves changes immediately when a new audio clip is assigned to maintain data consistency.
Declaration
public void RenderAudioClipHandler(UnityMusicTrackDefinition settings)
Parameters
| Type | Name | Description |
|---|---|---|
| UnityMusicTrackDefinition | settings |
RenderLoopHandler(UnityMusicTrackDefinition)
Renders the tail-preserving loop section.
Exposes the loop toggle and lets the author define the loop region either as raw time codes
(HH:MM:SS:MMM) or in DAW-style musical terms (tempo, time signature, start/end bar), showing the
resolved start/end times and warning when the region is invalid.
Declaration
public void RenderLoopHandler(UnityMusicTrackDefinition settings)
Parameters
| Type | Name | Description |
|---|---|---|
| UnityMusicTrackDefinition | settings | The music track definition to edit loop settings for. |
RenderTitleHandler(UnityMusicTrackDefinition)
Renders the title input field for the music track.
Provides editable text field for track title metadata.
Declaration
public void RenderTitleHandler(UnityMusicTrackDefinition scriptableObject)
Parameters
| Type | Name | Description |
|---|---|---|
| UnityMusicTrackDefinition | scriptableObject | The music track definition to edit title for. |