You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-18 14:21:41 +00:00
[3.2] C#: Fix Godot failing to find class namespace
Also avoid searching C# files recursively twice.
This commit is contained in:
@@ -178,7 +178,7 @@ namespace GodotTools.ProjectEditor
|
|||||||
if (root.AreDefaultCompileItemsEnabled())
|
if (root.AreDefaultCompileItemsEnabled())
|
||||||
{
|
{
|
||||||
var excluded = new List<string>();
|
var excluded = new List<string>();
|
||||||
result = GetAllFilesRecursive(Path.GetDirectoryName(projectPath), "*.cs").ToList();
|
result.AddRange(existingFiles);
|
||||||
|
|
||||||
foreach (var item in root.Items)
|
foreach (var item in root.Items)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ namespace GodotTools
|
|||||||
|
|
||||||
var firstMatch = classes.FirstOrDefault(classDecl =>
|
var firstMatch = classes.FirstOrDefault(classDecl =>
|
||||||
classDecl.BaseCount != 0 && // If it doesn't inherit anything, it can't be a Godot.Object.
|
classDecl.BaseCount != 0 && // If it doesn't inherit anything, it can't be a Godot.Object.
|
||||||
classDecl.SearchName != searchName // Filter by the name we're looking for
|
classDecl.SearchName == searchName // Filter by the name we're looking for
|
||||||
);
|
);
|
||||||
|
|
||||||
if (firstMatch == null)
|
if (firstMatch == null)
|
||||||
|
|||||||
Reference in New Issue
Block a user