![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | szccornish |
" Invalid type in function ‘add_child’ in base ‘Node2D (tes.gd)’. The Object-derived class of argument 1 (PackedScene) is not a subclass of the expected argument class."
can you explain to me what’s is means?
here my code :
extends Node2D
onready var tex = preload(“res://TSCN/Item_InRealWorld.tscn”)
var follow := false
func _ready():
. add_child(tex)
func _on_Button_pressed():
. follow = true
. pass # Replace with function body.
func _process(delta):
. if follow:
… tex.position = get_global_mouse_position()