Thanks for sharing the project, it was very easy to find the problem looking at it:
You have in your Concept
scene a Sprite
as root node and it has a script which is blank.
All scripts have to have an inheritance (the extends ...
part). It can be another script (put the path of the script, like extend "res://myscript.gd")
or an object (extends Node
).
If you don't have an inheritance at all or it's wrong (if you had, for example, a script in a Sprite
node that extended an Area2D
), it will not run and return this error.
It was not very explicit in the error message since it had no inheritance at all (this is why it was saying "inherits from native type 'Reference'". If you had, for example, extends Area2D
in that script, the error would be "Script inherits from native type 'Area2D', so it can't be instanced in object of type: 'Sprite'".
To solve that you can or delete the script since it has no code or add extends Sprite
if you plan using this script in the future.