public override void Process(PlayFMODCustomLoopingEmitter packet) { GameObject soundSource = NitroxEntity.RequireObjectFrom(packet.Id); FMODEmitterController fmodEmitterController = soundSource.RequireComponent <FMODEmitterController>(); fmodEmitterController.PlayCustomLoopingEmitter(packet.AssetPath); }
public override void Process(PlayFMODCustomLoopingEmitter packet) { Optional <GameObject> soundSource = NitroxEntity.GetObjectFrom(packet.Id); Validate.IsPresent(soundSource); FMODEmitterController fmodEmitterController = soundSource.Value.GetComponent <FMODEmitterController>(); Validate.IsTrue(fmodEmitterController); fmodEmitterController.PlayCustomLoopingEmitter(packet.AssetPath); }