Best way to make audio play only one time.

When my player enters a trigger some narration plays.
When my player dies the scene resets.
I don’t want the narration to play again.

What’s the best way to handle this? I can use PlayerPrefs but then I would need a different one for each piece of audio. Which is technically fine and doable but it seems like there’s an easier way to do this that I’m missing.

It sounds like you are wanting to create a Sound Manager script that manages the state of your sound effects, and knows if/when it should actually play sounds. I would recomment a Singleton for said manager and ensure that object survives scene loads (is flagged with DontDestroyOnLoad)

As for how you store the data, that largely depends on what functionality you are wanting.

  • Should this narration play again if the player quits the game and reopens? You probably just want to store the bool value for when to play in the manager and let it be reset when the game starts again.
  • Should this narration play only once on each computer it is run on? You could use PlayerPrefs or manually writing this data to a file.
  • Should this narration playing be associated with a save file that users could copy between computers? You will want to write this data to a save file (in some small convenient format) that can be copied or moved easily.