First Person Exploration Kit: Creating an Audio Diary

Audio Diaries are interactable objects in the game world that play an audio file and optionally show a title on screen. They can also be "collected" into the player's inventory and listened to again later.

Audio Diary

  1. Drag any 3D object into the scene (e.g. model of a tape recorder).
  2. Ensure the Collider is either correctly scaled and rotated (e.g. if using imported Mesh Collider), or remove it completely.
  3. If Collider was removed in step 2, add a new collider (e.g. Box Collider).
  4. Size the Collider (either imported, or added in step 3 above - e.g. Box Collider) to fit for the object you're making, with consideration to reticle aiming (e.g. if tiny scrap of paper, make collider big enough to get reticle over easily for the player).
  5. Add FPEInteractableAudioDiaryScript to your object and set the following variables to suit your object:
  6. Run the scene, and move the reticle over the new Audio Diary to trigger play back.
  7. To ensure the Audio Diary can be saved and loaded, ensure that the Audio Clip selected is placed inside a Resources folder, in a sub-folder called "AudioDiaryAudioClips"

Depending on the configuration options, an Audio Diary sound clip will play, and:

The title of the diary will be displayed,

and it can also be added to inventory screen under the Audio Diaries tab, and included in saved game data. To listen to the diary again, open the Audio Diaries tab in the inventory screen and click on the title of interest: