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.
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 |
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. |