Fix #2388 namespaces overlap in some plugins
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
|
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
|
||||||
|
|
||||||
//#define AUTO_DOC_TOOLTIPS
|
//#define AUTO_DOC_TOOLTIPS
|
||||||
|
//#define MARSHALLER_FULL_NAME
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
@@ -966,7 +967,13 @@ namespace Flax.Build.Bindings
|
|||||||
if (!classInfo.IsStatic)
|
if (!classInfo.IsStatic)
|
||||||
{
|
{
|
||||||
marshallerName = classInfo.Name + "Marshaller";
|
marshallerName = classInfo.Name + "Marshaller";
|
||||||
|
#if MARSHALLER_FULL_NAME
|
||||||
marshallerFullName = !string.IsNullOrEmpty(interopNamespace) ? $"{interopNamespace}.{marshallerName}" : marshallerName;
|
marshallerFullName = !string.IsNullOrEmpty(interopNamespace) ? $"{interopNamespace}.{marshallerName}" : marshallerName;
|
||||||
|
#else
|
||||||
|
if (!string.IsNullOrEmpty(interopNamespace))
|
||||||
|
CSharpUsedNamespaces.Add(interopNamespace);
|
||||||
|
marshallerFullName = marshallerName;
|
||||||
|
#endif
|
||||||
contents.Append(indent).AppendLine($"[NativeMarshalling(typeof({marshallerFullName}))]");
|
contents.Append(indent).AppendLine($"[NativeMarshalling(typeof({marshallerFullName}))]");
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -1487,7 +1494,13 @@ namespace Flax.Build.Bindings
|
|||||||
// NOTE: Permanent FlaxEngine.Object GCHandles must not be released when marshalling from native to managed.
|
// NOTE: Permanent FlaxEngine.Object GCHandles must not be released when marshalling from native to managed.
|
||||||
|
|
||||||
string marshallerName = structureInfo.Name + "Marshaller";
|
string marshallerName = structureInfo.Name + "Marshaller";
|
||||||
|
#if MARSHALLER_FULL_NAME
|
||||||
string marshallerFullName = !string.IsNullOrEmpty(interopNamespace) ? $"{interopNamespace}.{marshallerName}" : marshallerName;
|
string marshallerFullName = !string.IsNullOrEmpty(interopNamespace) ? $"{interopNamespace}.{marshallerName}" : marshallerName;
|
||||||
|
#else
|
||||||
|
if (!string.IsNullOrEmpty(interopNamespace))
|
||||||
|
CSharpUsedNamespaces.Add(interopNamespace);
|
||||||
|
string marshallerFullName = marshallerName;
|
||||||
|
#endif
|
||||||
structNativeMarshaling = $"[NativeMarshalling(typeof({marshallerFullName}))]";
|
structNativeMarshaling = $"[NativeMarshalling(typeof({marshallerFullName}))]";
|
||||||
|
|
||||||
var toManagedContent = GetStringBuilder();
|
var toManagedContent = GetStringBuilder();
|
||||||
|
|||||||
Reference in New Issue
Block a user