Godot Version
Question
So I’m new to Godot and I followed this tutorial: https://www.youtube.com/watch?v=Hz9-j3ceDag&t=818s to create a fade in/ out animation for switching scenes on a button press but nothing is happening- what did I do wrong? Note: the transition scene/ script is held within the transition node on the tree, it has within it an animation player with the animations “fade out” (yes, without the underscore- I messed up ) and “fade_in”
transitioner script:
extends Control
class_name Transitioner
@onready var anim_texture : TextureRect = $TextureRect
@onready var animation_player : AnimationPlayer = $AnimationPlayer
func _ready():
anim_texture.visible = false
func set_next_animation(fading_out: bool):
if (fading_out):
animation_player.queue("fade out")
else:
animation_player.queue("fade_in")
button code:
extends Button
@export var transitioner : Transitioner
func _on_pressed(button_press):
transitioner.set_next_animation(button_press)
Godot Version
4.1.3