diff --git a/Source/Tools/Flax.Build/Bindings/BindingsGenerator.Cpp.cs b/Source/Tools/Flax.Build/Bindings/BindingsGenerator.Cpp.cs index 8e8154b5a..fb11c83a2 100644 --- a/Source/Tools/Flax.Build/Bindings/BindingsGenerator.Cpp.cs +++ b/Source/Tools/Flax.Build/Bindings/BindingsGenerator.Cpp.cs @@ -388,17 +388,7 @@ namespace Flax.Build.Bindings // Find namespace for this type to build a fullname if (apiType != null) - { - var e = apiType.Parent; - while (!(e is FileInfo)) - { - e = e.Parent; - } - if (e is FileInfo fileInfo && !managedType.StartsWith(fileInfo.Namespace)) - { - managedType = fileInfo.Namespace + '.' + managedType.Replace(".", "+"); - } - } + managedType = apiType.Namespace + '.' + managedType.Replace(".", "+"); // Use runtime lookup from fullname of the C# class return "Scripting::FindClass(\"" + managedType + "\")";