godotengine / godotengine/godot

C# Plugin Compilation Errors Trigger Persistent "Cyclic Resource Inclusion"

Open
#93,046 1 comment 0 reactions 0 assignees View on GitHub
bug topic:dotnet topic:editor
Dominant language
C++
Stars
117k
Forks
26.8k
PR merge metrics
PR metrics pending

Description

### Tested versions

Reproducable 4.2.2 and 4,3,beta

### System information

Windows 11 - Godot Engine v4.2.2 OpenGL API 3.3.0

### Issue description

Creating or enabling C# plugins in Godot consistently triggers a "cyclic resource inclusion" error:

```ERROR: Another resource is loaded from path 'res://addons/Test/Test.cs' (possible cyclic resource inclusion). ```
This error persists even after recompiling the plugin with errors and attempting to create or re-enable other plugins.

### Steps to reproduce

1. Create a new C# plugin within Godot.
2. Introduce an error in the plugin's code, causing a compilation failure.
3. Attempt to create additional plugins or re-enable the existing plugin.
4. The "cyclic resource inclusion" error message will appear.

### Minimal reproduction project (MRP)

[GodotPluginTest.zip](https://github.com/user-attachments/files/15792763/GodotPluginTest.zip)

Additional Information:

The error seems to be triggered by a previous compilation failure in the C# plugin.
Clearing the plugin's cache or restarting Godot does not resolve the issue.
The error message suggests a circular dependency in resource loading, but the exact cause remains unclear.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.