Files
BusyRabbit/Plugins/UnrealSharp/Source/UnrealSharpManagedGlue/PropertyTranslators/InterfacePropertyTranslator.cs
wyatt 648386cd73 Lua向C#逻辑迁移 一期 #13
将整个插件代码上传
2025-10-26 21:48:39 +08:00

24 lines
735 B
C#

using EpicGames.UHT.Types;
using UnrealSharpScriptGenerator.Utilities;
namespace UnrealSharpScriptGenerator.PropertyTranslators;
public class InterfacePropertyTranslator : SimpleTypePropertyTranslator
{
public InterfacePropertyTranslator() : base(typeof(UhtInterfaceProperty))
{
}
public override string GetManagedType(UhtProperty property)
{
UhtInterfaceProperty interfaceProperty = (UhtInterfaceProperty)property;
return interfaceProperty.InterfaceClass.GetFullManagedName();
}
public override string GetMarshaller(UhtProperty property)
{
return $"{GetManagedType(property)}Marshaller";
}
public override bool CanSupportGenericType(UhtProperty property) => true;
}