[fix] 修复调用Data目录为Data~目录后读取资源文件失败的bug
parent
3440f79421
commit
07b56fe7e5
|
@ -38,7 +38,7 @@ namespace HybridCLR.Editor.Commands
|
|||
case PlatformABI.Arm64: tplFile = "Arm64"; break;
|
||||
default: throw new NotSupportedException();
|
||||
};
|
||||
return AssetDatabase.LoadAssetAtPath<TextAsset>($"{SettingsUtil.TemplatePathInPackage}/MethodBridge_{tplFile}.cpp.txt").text;
|
||||
return File.ReadAllText($"{SettingsUtil.TemplatePathInPackage}/MethodBridge_{tplFile}.cpp.txt");
|
||||
}
|
||||
|
||||
private static void GenerateMethodBridgeCppFile(Analyzer analyzer, PlatformABI platform, string templateCode, string outputFile)
|
||||
|
|
|
@ -20,7 +20,7 @@ namespace HybridCLR.Editor.Commands
|
|||
public static void GenerateReversePInvokeWrapper()
|
||||
{
|
||||
string ReversePInvokeWrapperStubFile = $"{SettingsUtil.LocalIl2CppDir}/libil2cpp/hybridclr/metadata/ReversePInvokeMethodStub.cpp";
|
||||
string wrapperTemplateStr = AssetDatabase.LoadAssetAtPath<TextAsset>($"{SettingsUtil.TemplatePathInPackage}/ReversePInvokeMethodStub.cpp.txt").text;
|
||||
string wrapperTemplateStr = File.ReadAllText($"{SettingsUtil.TemplatePathInPackage}/ReversePInvokeMethodStub.cpp.txt");
|
||||
int wrapperCount = SettingsUtil.GlobalSettings.ReversePInvokeWrapperCount;
|
||||
var generator = new Generator();
|
||||
generator.Generate(wrapperTemplateStr, wrapperCount,ReversePInvokeWrapperStubFile);
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
{
|
||||
"name": "HybridCLR.Editor",
|
||||
"rootNamespace": "",
|
||||
"references": [
|
||||
"UnityFS"
|
||||
],
|
||||
"references": [],
|
||||
"includePlatforms": [
|
||||
"Editor"
|
||||
],
|
||||
|
|
Loading…
Reference in New Issue