From 90c5058a4cbc3a190f7bd2523016c0995c134c07 Mon Sep 17 00:00:00 2001 From: Srkmn <47887032@qq.com> Date: Sun, 17 Nov 2024 17:15:24 +0800 Subject: [PATCH] Cross Version --- SourceCodeGenerator.cs | 16 ++++++++-------- SourceCodeGenerator.ubtplugin.csproj | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/SourceCodeGenerator.cs b/SourceCodeGenerator.cs index 61e18c3..b9774f1 100644 --- a/SourceCodeGenerator.cs +++ b/SourceCodeGenerator.cs @@ -124,21 +124,21 @@ namespace SourceCodeGeneratorUbtPlugin List tasks = new(); - foreach (var package in Session.Packages) + foreach (var module in Session.Modules) { - if (package.Module.ModuleType != UHTModuleType.EngineRuntime && - package.Module.ModuleType != UHTModuleType.GameRuntime) + if (module.Module.ModuleType != UHTModuleType.EngineRuntime && + module.Module.ModuleType != UHTModuleType.GameRuntime) { continue; } - if (ExportModule.All(module => - string.Compare(module, package.Module.Name, StringComparison.OrdinalIgnoreCase) != 0)) + if (ExportModule.All(x => + string.Compare(x, module.Module.Name, StringComparison.OrdinalIgnoreCase) != 0)) { continue; } - QueueClassExports(package, tasks); + QueueClassExports(module.ScriptPackage, tasks); } var waitTasks = tasks.Where(Task => Task != null).Cast().ToArray(); @@ -367,7 +367,7 @@ namespace SourceCodeGeneratorUbtPlugin builder.Append(GenerateInclude($"{value}{BindingSuffix}")); } - var fileName = Factory.MakePath(package.Key, HeaderSuffix); + var fileName = Factory.MakePath(package.Key.Module, HeaderSuffix); SaveIfChanged(fileName, builder); } @@ -759,7 +759,7 @@ namespace SourceCodeGeneratorUbtPlugin private string GetHeaderFile(UhtClass classObj) { - return Path.Combine(HeaderPath[classObj.Package.ShortName], classObj.HeaderFile.FilePath); + return Path.Combine(HeaderPath[classObj.Package.Module.ShortName], classObj.HeaderFile.FilePath); } private static string GenerateInclude(string file) diff --git a/SourceCodeGenerator.ubtplugin.csproj b/SourceCodeGenerator.ubtplugin.csproj index e4024fc..3c7f0c5 100644 --- a/SourceCodeGenerator.ubtplugin.csproj +++ b/SourceCodeGenerator.ubtplugin.csproj @@ -2,7 +2,7 @@ - net6.0 + net8.0 Development Library false