Files
wyatt 648386cd73 Lua向C#逻辑迁移 一期 #13
将整个插件代码上传
2025-10-26 21:48:39 +08:00

33 lines
1.1 KiB
C#

using System.Collections.Generic;
using EpicGames.UHT.Types;
using UnrealSharpScriptGenerator.Utilities;
namespace UnrealSharpScriptGenerator.PropertyTranslators;
public class SoftObjectPropertyTranslator : SimpleTypePropertyTranslator
{
public SoftObjectPropertyTranslator() : base(typeof(UhtSoftObjectProperty))
{
}
public override bool CanExport(UhtProperty property)
{
return property is UhtSoftObjectProperty;
}
public override string GetManagedType(UhtProperty property)
{
UhtSoftObjectProperty softObjectProperty = (UhtSoftObjectProperty)property;
string fullName = softObjectProperty.Class.GetFullManagedName();
return $"TSoftObjectPtr<{fullName}>";
}
public override string GetMarshaller(UhtProperty property)
{
UhtSoftObjectProperty softClassProperty = (UhtSoftObjectProperty) property;
string fullName = softClassProperty.Class.GetFullManagedName();
return $"SoftObjectMarshaller<{fullName}>";
}
public override bool CanSupportGenericType(UhtProperty property) => false;
}