Skip to main content

ImpactSoundMap

A class in Root.Township, the global namespace.

Asset that maps physic materials to Wwise switches, so impact sounds play the right material sound.

Constructors​

MemberWhat it is
ImpactSoundMap()Use ScriptableObject.CreateInstance instead of new; Unity loads the saved ones from assets.

Fields​

3 private and internal fields
MemberWhat it is
private List<ImpactSoundSet> impactSoundSetsThe material and switch pairs set in the inspector.
private static readonly Logger loggerNLog logger for load warnings.
private Dictionary<PhysicMaterial, Switch> materialTypeBacking field for MaterialType.

Properties​

MemberWhat it is
Dictionary<PhysicMaterial, Switch> MaterialType { get; }Physic material to Wwise switch map, built on first use.

Methods​

1 private and internal method
MemberWhat it is
private void LoadImpactSoundMap()Builds materialType from the sound sets. Warns on null sets and duplicates; the last duplicate wins.

Used in​

Members of other types that take, return or hold a ImpactSoundMap: