Skip to content
This repository was archived by the owner on Mar 7, 2026. It is now read-only.
This repository was archived by the owner on Mar 7, 2026. It is now read-only.

feat: Implement Unity Audio module adapter #2

@Bli-AIk

Description

@Bli-AIk

🔗 Is your feature request related to a specific issue?

Lunar.Core.Base provides an AudioManagerBase interface for decoupled audio logic, but it lacks a concrete implementation for Unity. As a result, any game logic written against the core interface cannot produce sound in a Unity-based project.


💡 Feature Description

  • Expected outcome or effect: A concrete Unity-side implementation of AudioManagerBase that bridges the framework’s abstract audio interface with Unity’s built-in audio system.

  • Specific implementation ideas, such as classes, methods, parameters, or API design:

    • Provide a Unity adapter that implements AudioManagerBase.
    • Internally, it should delegate playback and mixing to Unity APIs (AudioSource, AudioClip, AudioMixer).
    • Core methods (e.g., play sound effect, play music, adjust volume) should align with the existing abstract interface.
  • Usage scenarios or benefits: Enables games built on Lunar to play sounds and music in Unity using its robust audio pipeline, including features like 3D audio, Doppler effects, and AudioMixer integration.

  • Engine-specific context: Works in both Editor and Play mode. Targets all Unity platforms. Compatible with Mono and IL2CPP.

  • Engine name & version: Unity 2021.3 LTS or later.


⚖ Alternatives Considered

N/A


📝 Additional Information

  • Example usage flow:
    Game LogicAudioManagerBase.PlaySound("Explosion") → Unity implementation delegates to AudioSource for playback.

See Lunar.Core.Base#2

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

Status

Backlog

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions