Fix incorrect class namespace in bindings class name lookups
This commit is contained in:
@@ -388,17 +388,7 @@ namespace Flax.Build.Bindings
|
|||||||
|
|
||||||
// Find namespace for this type to build a fullname
|
// Find namespace for this type to build a fullname
|
||||||
if (apiType != null)
|
if (apiType != null)
|
||||||
{
|
managedType = apiType.Namespace + '.' + managedType.Replace(".", "+");
|
||||||
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(".", "+");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Use runtime lookup from fullname of the C# class
|
// Use runtime lookup from fullname of the C# class
|
||||||
return "Scripting::FindClass(\"" + managedType + "\")";
|
return "Scripting::FindClass(\"" + managedType + "\")";
|
||||||
|
|||||||
Reference in New Issue
Block a user