- Edited
I'm new to Godot and also having a similar, strange problem.
I have a simple scene. I have a ball.tsvn object with a script attached, and when I click, it creates another ball once.
The "Original" ball shows the @export as "PackedScene" with a resource path like res://Scene.tscn::PackedScene_ddo6q
The first copy shows the @export as an icon with the resource path res://Prefabs/ball.tscn
The copy of the first copy shows the shows the export path as null
I've tried using the "Local to Scene" ticked and unticked to no avail.
Here is the relevant code:
@export var ball_to_spawn: PackedScene
var create: bool = true
func _spawn():
if create:
create = false
var new_ball = ball_to_spawn.instantiate();
get_parent().add_child(new_ball)
new_ball.global_position = global_position