Class AudioSettings
Scriptable object with settings info.
Namespace: OmiyaGames.Audio
Assembly: cs.temp.dll.dll
Syntax
public class AudioSettings : BaseSettingsData
Remarks
Copyright (c) 2022 Omiya Games Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
Revision | Description |
---|---|
Version: 0.1.0-exp.1 Date: 2/13/2022 Author: Taro Omiya | Initial draft. |
Version: 1.0.0 Date: 6/21/2022 Author: Taro Omiya | Adding documentation. |
Fields
DATA_DIRECTORY
Declaration
public const string DATA_DIRECTORY = "Packages/com.omiyagames.audio/Runtime/Data/"
Field Value
Type | Description |
---|---|
String |
Properties
Ambience
The background ambience layer. Allows playing and managing BackgroundAudio clips.
Declaration
public AudioLayer.Background Ambience { get; }
Property Value
Type | Description |
---|---|
AudioLayer.Background |
CurrentVersion
Declaration
public override int CurrentVersion { get; }
Property Value
Type | Description |
---|---|
Int32 |
Main
The main layer of audio. This affects the volume and pitch of all audio sources wired to any layer in this manager.
Declaration
public AudioLayer Main { get; }
Property Value
Type | Description |
---|---|
AudioLayer |
Mixer
The main mixer of this game.
Declaration
public AudioMixer Mixer { get; }
Property Value
Type | Description |
---|---|
AudioMixer |
Music
The background music layer. Allows playing and managing BackgroundAudio clips.
Declaration
public AudioLayer.Background Music { get; }
Property Value
Type | Description |
---|---|
AudioLayer.Background |
MuteVolumeDb
The volume in which Mixer interprets as mute.
Declaration
public float MuteVolumeDb { get; }
Property Value
Type | Description |
---|---|
Single |
PercentToDbCurve
The curve used to convert a fraction between 0
and 1
to decibels. Used to make it easier to set the mixer volume.
Declaration
public AnimationCurve PercentToDbCurve { get; }
Property Value
Type | Description |
---|---|
AnimationCurve |
SoundEffects
The layer dedicated to sound effects. This affects the volume and pitch of any audio sources wired to DefaultUiGroup or DefaultGroup.
Declaration
public AudioLayer.Spatial SoundEffects { get; }
Property Value
Type | Description |
---|---|
AudioLayer.Spatial |
TimeScaleSnapshots
Settings to map
Declaration
public TimeScaleAudioModifiers[] TimeScaleSnapshots { get; }
Property Value
Type | Description |
---|---|
TimeScaleAudioModifiers[] |
Voices
The layer dedicated to voices. This affects the volume and pitch of any audio sources wired to DefaultUiGroup or DefaultGroup.
Declaration
public AudioLayer.Spatial Voices { get; }
Property Value
Type | Description |
---|---|
AudioLayer.Spatial |
Methods
DefaultPercentToVolumeDbConversion(Single)
The default percent to decibels converter, assuming mute-decibel is -80 dB.
Declaration
public static float DefaultPercentToVolumeDbConversion(float percent)
Parameters
Type | Name | Description |
---|---|---|
Single | percent | Value from 0 to 1. |
Returns
Type | Description |
---|---|
Single | Volume, in decibels, where -80 dB is mute. |
OnUpgrade(Int32, out String)
Declaration
protected override bool OnUpgrade(int oldVersion, out string errorMessage)
Parameters
Type | Name | Description |
---|---|---|
Int32 | oldVersion | |
String | errorMessage |
Returns
Type | Description |
---|---|
Boolean |