Effect Tags can be used to have different footstep effects play for different game objects.
You want your wooden floor to sound like a wooden floor – but should every character walking on it make the same sound? Or, you want your grass to sound like grass – but should it sound the same if it’s raining and the grass is wet?
Probably not … that’s where Effect Tags come into play!
In Footstep Materials
Footstep Materials define a Default Effect and can add optional Tag Effects.
The tag effects are used if a Footstepper component defines an Effect Tag – if a tag effect with a matching Tag is found, it’ll use that footstep effect, otherwise it’ll use the default effect.
The Effect Tag setting is the first setting of a Footstepper component.
This defines which footstep effect a Footstepper will use from the ground’s Footstep Material. E.g. if you want a character in heavy armor to sound differently, clunking through the level, set up an effect tag like heavyArmor. If the ground has a tag effect set up for the heavyArmor tag, it’ll use that footstep effect.
You can also change the effect tag in a running game by simply changing the effectTag field on the Footstepper component of a game object. E.g. use this to change the footstep effects based on the current environment, like when it’s raining and the ground is wet:
Footstepper footstepper = gameObject.GetComponent<Footstepper>();
if(footstepper != null)
footstepper.effectTag = "wet";
When using Footstepper‘s classes or components in your code, make sure to include the GamingIsLove.Footsteps namespace at the top of your script file: