Hi there.
I have multiple “coins” in my game, which all share a common “Coin.cs” script.
These coins have 5 different Public sound effects attached to them. Each time I decide to change a sound effect, I have to re-link the public sound to each of my different types of coins. Is there a way to establish one batch of AudioClips that will relate to all coins? I tried creating a “Sounds.cs” script, which will hold AudioClips for my different interactions (e.g. “metal_collision”, “wood_collision”, “jackpot”, etc.), attached it to my Coin, and used getComponent() inside of my Coin script, but something isn’t referencing correctly. (“Object reference not set to an instance…”)
What’s the best way to create a public sound library I only have to populate manually once, and can then reference from any object?
Thanks!