You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Merge pull request #12138 from neikeq/i
Avoid adding built-in script path to csproj
This commit is contained in:
@@ -1421,12 +1421,15 @@ bool CSharpScript::can_instance() const {
|
||||
|
||||
#ifdef TOOLS_ENABLED
|
||||
if (Engine::get_singleton()->is_editor_hint()) {
|
||||
if (_create_project_solution_if_needed()) {
|
||||
CSharpProject::add_item(GodotSharpDirs::get_project_csproj_path(),
|
||||
"Compile",
|
||||
ProjectSettings::get_singleton()->globalize_path(get_path()));
|
||||
} else {
|
||||
ERR_PRINTS("Cannot add " + get_path() + " to the C# project because it could not be created.");
|
||||
|
||||
if (get_path().find("::") == -1) { // Ignore if built-in script. Can happen if the file is deleted...
|
||||
if (_create_project_solution_if_needed()) {
|
||||
CSharpProject::add_item(GodotSharpDirs::get_project_csproj_path(),
|
||||
"Compile",
|
||||
ProjectSettings::get_singleton()->globalize_path(get_path()));
|
||||
} else {
|
||||
ERR_PRINTS("Cannot add " + get_path() + " to the C# project because it could not be created.");
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user