logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Namespace Serenity.UnityMusicPlayer.Tests.Infrastructure

    Classes

    UnityMusicPlayerServiceTests

    Tests for UnityMusicPlayerService playlist management and audio-settings validation. The service is a MonoBehaviour, so it is driven through AddComponent on a real GameObject and exercised via its public playlist API and ValidateAudioGameSettings. Audio-engine-driven paths (PlaySong with tracks, transitions, tail-preserving loops) require loaded AudioClips and a populated AudioSource pool and are intentionally not covered here.

    UnityMusicTrackDefinitionTests

    Tests for UnityMusicTrackDefinition — the ScriptableObject that authors a single music track. Covers the pure loop-point resolution logic (Time vs Bars input modes, end-time fallback), the custom fade-out curve sampling, and the IMusicTrackDefinition interface mappings. Instances are created with UnityEngine.ScriptableObject.CreateInstance``1 and destroyed in teardown.

    In this article
    © 2026 Serenity. All Rights Reserved