Tazman-AudioFabric ManualDemosAdventure Demo Project

Adventure Demo Project

The adeventure demo project demonstrates the way in which Fabric can be integrated into a project and play Dolby Audio content along with standard audio assets.

It is available to download from here.

Setup

Refer to the fabric-manual  how to download and install the latest version of Fabric

Project assets

Scenes

The project is made of three scenes:

  • Persistent
  • Market
  • SecurityRoom

Audio Assets

The audio assets are located in the "Assets/AudioClips" folder

the Dolby Audio files are located in the "Assets/StreamingAssets" folder, In this example the DDP files are used for background music and ambiences.

 

Dolby Audio files MUST be placed in the StreamingAssets folder

Scenes

Persistent Scene

The persistence scene contains the Fabric manager and its core components and is active for the duration of the game. This means that the background music and player components will always be present and play regardless which scene is currently loaded.

Fabric hierarchy

The Fabric hierarchy contains a number of Fabric component each providing a specific behaviour. At the top there are three group components representing the main categories of sound types,

  • Music
  • SFX
  • VO

Refer to the components section in the Fabric-Manual for more info about the different components available

Event Editor

The event editor (Window/Fabric/EventEditor) contains the events that are associated with the Fabric components and instruct them to perform specific actions when they are posted from the game. For the demo most events are set to play the component.

Refer to the event editor section in the Fabric-Manual for more details

Dolby Audio Component

The demo contains a number of Dolby Audio Components, these are:

  • BackgroundMusic in Persistent scene
  • Ambience in SecurityRoom scene
  • Ambience in Market scene

Security Room Scene

The security room scene is loaded automatically at the start of the demo. In its hierarchy there is a Level Audio game object that containes two "External" Fabric Group Components and a Fabric Event Trigger.

You will notice that there is no Fabric manager present in the scene, this is not necessary since the manager will be loaded along with the Persistent scene.  

Event Trigger

The event trigger is set to post the event "Ambience" that starts playing the Dolby Audio component with the Ambience DDP file. This should happen at the start of the scene when the character enters/exits the room.

External Group Components

When a Group Component is located outside the main Fabric hierarchy and the "External Group" option is enabled in the Fabric manager they will automatically register with the main hierarchy.

The "Security Room SFX" external group is set to load underneath the SFX group component in the main hiearchey as shown in the inspector view,

The external group components have their own lists of events and are visible in the Event Editor.

Refer to the event editor and how to manage audio assets in the Fabric-Manual for more details about external group components

Market Scene

Again just like in the Security Room Scene the Market Scene the Fabric components are located underneath the Level Audio game object.

Game Integration

The game is made of interactable objects (i.e. Coffee Bot, Guard, Bird etc) each containing a number of Audio Rections that the player can interact with.

The Audio Reaction components are responsible for posting a Fabric event when the player interacts with them.

They contain the following properties,

  • Fabric Event: Event to post
  • Delay: Delay the event by a specific amount of time
  • GameObject: Game object used with the event