SoundParameterIntensity
A parameter which can control multiple aspects of the sound through code
SoundParameterIntensity
Oneshot Intensity - Physics Impacts
using UnityEngine;
using Sonity;
public class ExampleIntensityParameterCollision: MonoBehaviour {
public SoundEvent soundImpact;
private SoundParameterIntensity soundIntensityParameter = new SoundParameterIntensity(1f, UpdateMode.Once);
void OnCollisionEnter(Collision collision) {
// Sets the intensity parameter to the velocity of the collision
soundIntensityParameter.Intensity = collision.relativeVelocity.magnitude;
// Plays the SoundEvent with the intensity parameter
soundImpact.Play(transform, soundIntensityParameter);
}
}Physics Impact - SoundContainer


Continuous Intensity - Car Engine
Car Engine - SoundContainer

Last updated