Every component comes with a menu bar that provides a number of options,
- Save: Will export the component node into an XML file
- Load: Will load an XML file on top of the component or underneath into a new child
- ? : Opens a URL link to the online manual for the selected component
- >> : Opens a pull down menu with a number of options:
All components come with a custom inspector UI that allows modifying their properties according to their position in the hierarchy.
A component displays different properties according to their position in the hierarchy or if they have a listener attached.
The node info provides an overview of the component internal state and properties such as: the number of instances used/exist, volume and pitch with their randomisation offsets as well as CPU current/max usage.
Propagation of component properties
All of the component properties are propagated through their hierarchy and are either added or multiplied with their parent properties. However, it is possible to override some of the parent properties and use their own values instead.
Any component that has an event listener attached will allow to set the number of maximum instances that can be played along with the priority and stealing behaviour that will be used if all instances are playing and a play sound event has been requested.
The virtualization option allows the component to store all the PlaySound event requests and track their distance from the listener. When an event is within the max distance property the component will allocate and play an instance. If the event moves outside the max distance value it will stop playing it release the instance but keep tracking it. The event will be released when an EventAction.StopSound has been received. This is a great method to start a large number of ambient sources (i.e. torches, forests, birds) each having their own unique audio position but only use a small number of audio resources.
The component virtualization allows you to define different types of behaviors such as:
- Resume: When the component turns virtual the position of the audio components are paused and then resumed when they turned physical
- Play From Start: All audio components will start from the beginning when they become physical
- Play From Elapsed Time: In this behavior Fabric tracks the time of the audio components whilst they are virtual and sets them at the elapsed time when they turn physical again.
AudioMixer Group (Unity 5 only)
The component allows you to set the audio mixer group that all the audio sources in the hierarchy will be routed through.
The fade properties are only used when the component is played either through the event system or as part of a child component (i.e. sequence, switch etc).
Volume / Pitch properties
The component volume and pitch properties by default are always multiplied with its parent volume and pitch properties unless the override tick box is selected which then uses the node’s properties.
The default behaviour of these properties is to passed down from their parent unmodified. When the override tick box is selected for either property then they become the properties that are going to be propagated down the hierarchy.
Import Selected Audio Clips
Fabric provides a method to quickly import a selection of audio clips as audio components or dialog audio components. This is particularly useful when it is necessary to import a large number of audio such as dialog files into a random component etc.
This allows the selection of multiple audio clips without the inspector view loosing focus.
The audio clips are selected in the project tab view can be simply dragged and dropped in the drop box area and for each clip an audio component will be created according to the type selected.