Cross Version

pull/4/head
Srkmn 2 years ago
parent 66d28f5ff8
commit 90c5058a4c
  1. 16
      SourceCodeGenerator.cs
  2. 2
      SourceCodeGenerator.ubtplugin.csproj

@ -124,21 +124,21 @@ namespace SourceCodeGeneratorUbtPlugin
List<Task?> tasks = new(); List<Task?> tasks = new();
foreach (var package in Session.Packages) foreach (var module in Session.Modules)
{ {
if (package.Module.ModuleType != UHTModuleType.EngineRuntime && if (module.Module.ModuleType != UHTModuleType.EngineRuntime &&
package.Module.ModuleType != UHTModuleType.GameRuntime) module.Module.ModuleType != UHTModuleType.GameRuntime)
{ {
continue; continue;
} }
if (ExportModule.All(module => if (ExportModule.All(x =>
string.Compare(module, package.Module.Name, StringComparison.OrdinalIgnoreCase) != 0)) string.Compare(x, module.Module.Name, StringComparison.OrdinalIgnoreCase) != 0))
{ {
continue; continue;
} }
QueueClassExports(package, tasks); QueueClassExports(module.ScriptPackage, tasks);
} }
var waitTasks = tasks.Where(Task => Task != null).Cast<Task>().ToArray(); var waitTasks = tasks.Where(Task => Task != null).Cast<Task>().ToArray();
@ -367,7 +367,7 @@ namespace SourceCodeGeneratorUbtPlugin
builder.Append(GenerateInclude($"{value}{BindingSuffix}")); builder.Append(GenerateInclude($"{value}{BindingSuffix}"));
} }
var fileName = Factory.MakePath(package.Key, HeaderSuffix); var fileName = Factory.MakePath(package.Key.Module, HeaderSuffix);
SaveIfChanged(fileName, builder); SaveIfChanged(fileName, builder);
} }
@ -759,7 +759,7 @@ namespace SourceCodeGeneratorUbtPlugin
private string GetHeaderFile(UhtClass classObj) 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) private static string GenerateInclude(string file)

@ -2,7 +2,7 @@
<Import Project="SourceCodeGenerator.ubtplugin.csproj.props" Condition="Exists('SourceCodeGenerator.ubtplugin.csproj.props')" /> <Import Project="SourceCodeGenerator.ubtplugin.csproj.props" Condition="Exists('SourceCodeGenerator.ubtplugin.csproj.props')" />
<Import Project="$(EngineDir)\Source\Programs\Shared\UnrealEngine.csproj.props" /> <Import Project="$(EngineDir)\Source\Programs\Shared\UnrealEngine.csproj.props" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>net6.0</TargetFramework> <TargetFramework>net8.0</TargetFramework>
<Configuration Condition=" '$(Configuration)' == '' ">Development</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Development</Configuration>
<OutputType>Library</OutputType> <OutputType>Library</OutputType>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath> <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>

Loading…
Cancel
Save