Guidance / API reference
AudioEventRegistry
Namespace: AudioSystem
Inheritance: ScriptableObject
Access: Singleton via AudioEventRegistry.Instance
Description
Central registry for AudioEvents and AudioStates. Eliminates the Resources folder requirement by tracking assets in a single registry.
Purpose:
- Store references to all Events and States
- Auto-detect and use instead of Resources.LoadAll
- Allow Events/States to live anywhere in project
- Backwards compatible (falls back to Resources if no registry)
Properties
public static AudioEventRegistry Instance { get; }
public IReadOnlyList<AudioEvent> AudioEvents { get; }
public IReadOnlyList<AudioState> AudioStates { get; }
Methods
public void RegisterEvent(AudioEvent audioEvent)
public void RegisterState(AudioState audioState)
public void AutoPopulateFromResources() // Editor only
public void AutoPopulateFromProject() // Editor only
public void ValidateRegistry() // Editor only
Setup Example
// 1. Create registry asset:
// Right-click -> Create > Audio System > Audio Event Registry
// 2. Place in: Assets/Audio/Resources/AudioEventRegistry.asset
// 3. Populate registry (in Inspector):
// Click "Populate from Resources" or "Populate from Entire Project"
// 4. AudioManager automatically uses registry at startup
// (Falls back to Resources.LoadAll if registry not found)
Migration: See Migration in the User Guide for full details.
From the Pepper.SFX 3.1 guides (API_REFERENCE.md). Something wrong or unclear? Tell me.