it does not do what it's supposed to for some reason when easy_audio is turned off it sounds like it plays the audio 212 times, or with wrong effect parameters. but atleast now it doesnt crash
13 lines
328 B
GDScript
13 lines
328 B
GDScript
extends Node3D
|
|
|
|
@onready var audio_player: ChangableAudioStreamPlayer3D = $ChangableAudioStreamPlayer3D
|
|
|
|
var is_playing: bool = false
|
|
|
|
func toggle():
|
|
is_playing = !is_playing
|
|
%SpatialAudio3D.do_play(3.5)
|
|
|
|
# Called when the node enters the scene tree for the first time.
|
|
func _ready() -> void:
|
|
%Button.pressed.connect(toggle)
|