Skip to content

VoiceUtils

Guribo edited this page Jul 5, 2026 · 4 revisions

VoiceUtils

Packages/tlp.udonvoiceutils/Runtime/Core/PlayerAudio/VoiceUtils.cs

Static utility methods for audio calculations.

Methods

FindPlayerAudioController()

Searches the scene for the TLP_PlayerAudioController GameObject and returns its PlayerAudioController component.

PlayerAudioController controller = VoiceUtils.FindPlayerAudioController();

Returns null if not found. Logs error to console.

LinearFalloff(min, max, distance)

Linear audio rolloff between min and max distance.

Param Description
min Distance where volume starts decreasing
max Distance where volume reaches 0
distance Current distance

Returns 0-1 (1 = full volume, 0 = silent).

LogarithmicFalloff(min, distance)

Logarithmic audio rolloff from min distance outward.

Param Description
min Distance where rolloff begins
distance Current distance

Returns 0-1.

CalculateImportance(...)

Calculates importance score for audio source prioritization. Used by the time-sliced update system to determine which audio sources matter most.

See Also

Clone this wiki locally