PlaySound
PlaySound is a built-in component for playing sound effects in your scene. This component can be found in the built-in components section of the Assets Catalog and attached to any GameObject. Use it to play sound effects at specific moments or in response to events.
Methods
Plays the sound effect associated with this component.
--!SerializedField
local SoundObject : GameObject = nil
local soundPlayer = SoundObject:GetComponent(PlaySound)
soundPlayer.Play()
Returns
void
Updated 13 days ago