public struct AudioEventRefWhich event an AudioSource plays, instead of a bare clip.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
It replaces AudioClipRef rather than joining it. An entity carrying both would be a question with no good answer, so the event wins and the clip is ignored — and the queries are written so that only one of the two ever fires for an entity.
The event decides more than the clip did. Which take, at what level and pitch, on which bus, how far it carries and how many copies may sound at once are all the event's; Bus and Loop are not read. Gain and Pitch still are, as trims multiplied into what the event chose — so an emitter can be faded without knowing what it is playing.
An AudioSpatial beside it supplies the position and nothing else. Where a sound is belongs to the entity; how it attenuates belongs to the event, which is the split that lets a designer change a rolloff without opening a scene.
Fields and properties (1)
public AudioEvent? EventThe event. A source with none plays nothing and is not an error.
Used by (6)
- AudioEventSystemTestsVixen.Audio.Tests
- AudioSystemVixen.Audio
- ComponentRegistrationVixen.Audio
- TypeRegistrationVixen.Audio
- Vixen_Audio_Ecs_AudioEventRefSerializerVixen.Audio
- MaterialIconsVixen.Editor.App