possible cyclic resource inclusion on empty project

Godot Version



I am working on a game in c#. After a while, I created a new script, and got the error “Another resource is loaded from path ‘res://new_script.cs’ (possible cyclic resource inclusion).”

I tried to remove the code in the new script, but I still get the error if it is empty. I also tried to create a new project, and still get the error. I have one scene, and one c# script. The script is empty. I still get the error.

I have no idea if it is even a programming problem, since the error persists in any project that I make to test it.

Thank you for your help

I have a script called main. When I called the script that initially started the problem main2, the error disappeared. However, I have tested with names such as “something”, “test”, “thing”, “foo”, and in all cases still had the error

Hard to say without seeing the code. Could you upload the project?

I’d avoid using Class names call main. Also you want to be saving script files with the same name & case of the class. C# Class names should be in PascalCase. Every word starts with a Capital letter. Save the script with the same name.
Make sure you’re not loading scripts multiple times on different nodes. I think you can do it, but I’d say it’s probably not best practice and this is where inheritance can jump in.


Thank you for replying.Why should I not be using main as a class name?
Could you please tell me how to upload the project?

All I did was create a new scene, with a single node, and attached a c# script to it. the problem also does not appear if the script is in gdscript. There is no code in the script.

Yeah it is odd. Not sure why it could be doing it. You could upload the code and share a link with something like Dropbox, Google drive or We Transfer. Just don’t put any personal info in your code.

C++ & C# use the main class as an entry point for the executable. So somewhere deep inside Godot there could be a main class. I’m not 100% sure about that, but it’s easy to avoid using the name.