(Error/Bug) Godot loads script from another project and shows an error

Godot Version 4.2.2

Question

Error: Class “Player” hides a global script class

I’ve got a problem. I’m working on a one project, and check how to write scripts from another project. So I have a script, that has a same class_name in those projects. Those projects are located way too far from each other, so I have no idea how this engine loads a script from another project, that has no connection to another one.

My current project’s script:

Another template project, that I use for learning:

These two screenshots are from different projects…

this doesnt look like you are using godot editor?

Yep, I use VS Code as IDE. But I think that’s not this IDE’s issue.

Also I can call classes and functions from another project. It’s really weird, cuz, f.e. in Unity engine doesn’t work same. I guess, even if I relocate that template project to another physical disk, it will work same, as in this situation :melting_face: