public sealed class NetworkAudioApplySystemMakes a local sound do what the wire says.
No guide page documents this yet — the page shows what the code says about itself.
As a system
- Phase
- PreRender
- Reads
- NetworkId NetworkAudioSource
- Writes
- AudioSource
Remarks
A re-trigger restarts the sound even when the state did not change. That is the whole reason the counter exists: a one-shot played twice is Playing both times, so a receiver comparing states would see nothing and the second shot would be silent. The receiver keeps the last trigger it acted on rather than reading it back off the component, because the component is what arrived and not what was done with it.
Fields and properties (5)
public SystemAccess AccessWhat this system reads and writes.
public NetworkRulesRegistry? RulesWho decides what, and who this peer is. Null is server-authoritative.
public PlayerId LocalWhich player this peer is, or None for a server.
public long AppliedCountHow many sounds have been driven from the wire.
public long RestartedCountHow many were restarted because the trigger moved.
Methods (4)
public override JobHandle Update(in SystemContext context, JobHandle dependency)Runs the system.
public void Apply(World world)Drives every networked sound this peer does not decide.
public void Forget(NetworkId id)Forgets what it knew about an object, because it is gone.
public bool IsAuthority(NetworkId id)Whether this peer decides what a sound is doing.
Used by (1)
- NetworkAudioTestsVixen.Net.Audio.Tests