Show / Hide Table of Contents

Class WeaverAudio

Used for playing audio under certain channels.

Inheritance
object
WeaverAudio
Namespace: WeaverCore
Assembly: WeaverCore.dll
Syntax
public static class WeaverAudio

Properties

| Edit this page View Source

MainMixer

Gets the main audio mixer that hollow knight uses

Declaration
public static AudioMixer MainMixer { get; }
Property Value
Type Description
AudioMixer
| Edit this page View Source

MasterMixerGroup

Gets the "Master" audio group

Declaration
public static AudioMixerGroup MasterMixerGroup { get; }
Property Value
Type Description
AudioMixerGroup
| Edit this page View Source

MusicMixerGroup

Gets the "Music" audio group for music related audio

Declaration
public static AudioMixerGroup MusicMixerGroup { get; }
Property Value
Type Description
AudioMixerGroup
| Edit this page View Source

SoundsMixerGroup

Gets the "Sounds" audio mixer for playing game sounds

Declaration
public static AudioMixerGroup SoundsMixerGroup { get; }
Property Value
Type Description
AudioMixerGroup

Methods

| Edit this page View Source

Create(AudioClip, Vector3, float, AudioChannel)

Creates an audio player that can be used to play an audio clip under a certain audio channel. Use the Play(bool) function to play the sound

Declaration
public static AudioPlayer Create(AudioClip clip, Vector3 position, float volume = 1, AudioChannel channel = AudioChannel.Sound)
Parameters
Type Name Description
AudioClip clip

The clip to play

Vector3 position

Where in the scene should the sound be played at

float volume

The volme of the audio clip

AudioChannel channel

The audio channel the sound should be played under

Returns
Type Description
AudioPlayer

Returns a new audio player for playing the audio clip

| Edit this page View Source

GetMixerForChannel(AudioChannel)

Gets the mixer group for a certain channel

Declaration
public static AudioMixerGroup GetMixerForChannel(AudioChannel channel)
Parameters
Type Name Description
AudioChannel channel

The channel to get the mixer group for

Returns
Type Description
AudioMixerGroup
| Edit this page View Source

PlayAtPoint(AudioClip, Vector3, float, AudioChannel)

Plays a clip at the specified point. Automatically deletes itself when the clip is done playing. For more control, refer to Create(AudioClip, Vector3, float, AudioChannel)

Declaration
public static AudioPlayer PlayAtPoint(AudioClip clip, Vector3 position, float volume = 1, AudioChannel channel = AudioChannel.Sound)
Parameters
Type Name Description
AudioClip clip

The clip to play

Vector3 position

The position to play at

float volume

How loud the player will be

AudioChannel channel

What audio channel the player will be playing under

Returns
Type Description
AudioPlayer

The player that is playing the audio

| Edit this page View Source

PlayAtPointLooped(AudioClip, Vector3, float, AudioChannel)

Plays a clip forever untill it's manually destroyed

Declaration
public static AudioPlayer PlayAtPointLooped(AudioClip clip, Vector3 position, float volume = 1, AudioChannel channel = AudioChannel.Sound)
Parameters
Type Name Description
AudioClip clip

The clip to play

Vector3 position

The position to play at

float volume

How loud the player will be

AudioChannel channel

What audio channel the player will be playing under

Returns
Type Description
AudioPlayer

The player that is playing the audio

  • Edit this page
  • View Source
☀
☾
In this article
Back to top
Generated by DocFX
☀
☾