![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | Fedar |
I need to store my existing player as a variable type in another file but when I try to use Player class program throws an error like:
Parse Error: The identifier "Player" isn't a valid type (not a script or class), or couldn't be found on base "self".
My OtherClass.gd is like that. How can I use Player class in other files?
extends Node
onready var Player = preload("res://resource/character/Player.gd")
var player: Player
func _ready():
pass