Skip to content

An item with the same key has already been added. Key: res://MainFile.cs#9

Open
SyraLessThanThree wants to merge 1 commit intoAlchyr:masterfrom
SyraLessThanThree:master
Open

An item with the same key has already been added. Key: res://MainFile.cs#9
SyraLessThanThree wants to merge 1 commit intoAlchyr:masterfrom
SyraLessThanThree:master

Conversation

@SyraLessThanThree
Copy link

@SyraLessThanThree SyraLessThanThree commented Mar 22, 2026

When Godot.Bridge.ScriptManagerBridge.LookupScriptsInAssembly(Assembly.GetExecutingAssembly()); is added to the MainFile all .cs files are also added to the godot filesystem.
So there is gonna be an error
An item with the same key has already been added. Key: res://MainFile.cs
when multiple Mods have Godot.Bridge.ScriptManagerBridge.LookupScriptsInAssembly(Assembly.GetExecutingAssembly());
and .cs files of the same name in the same Location.

In the Templates that specifically happens with MainFile.cs.

Moving them to the folder of the modname would fix that unless they have the same name (in which case we have bigger problems anyway).

@SyraLessThanThree
Copy link
Author

SyraLessThanThree commented Mar 22, 2026

The error doesn't change behavior in any way and all the mods still work as intended.
But it shows that mods loaded with errors which can be confusing so this would be a better approach.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant