@@ -439,7 +439,7 @@ private bool InjectBinaryPlumbing(PluginDescriptor descriptor, out PluginDescrip
439439
440440 if ( ! pretend && options . UPluginAssociateEngineVersion )
441441 {
442- descriptor = descriptor with { EngineVersion = Unreal . Version ( build ) . VersionMinor } ;
442+ descriptor = descriptor with { EngineVersion = Unreal . Version ( build ) . VersionMinor + ".0" } ;
443443 Unreal . WriteJson ( descriptor , outUPlugin ) ;
444444 }
445445
@@ -607,31 +607,53 @@ public AbsolutePath BuildPlugin(
607607 try
608608 {
609609 UbtConfig Common ( UbtConfig _ ) => _
610- . Project ( shortHostProjectDir / "HostProject.uproject" )
611- // .Plugin(shortPluginDir / PluginPath.Name) // this just breaks plugin distribution
612- // .NoUBTMakefiles()
613610 . NoHotReload ( )
614- . Apply ( ubtConfig )
615611 . Apply ( build . UbtGlobal )
612+ . Apply ( ubtConfig )
613+ ;
614+ UbtConfig CommonProject ( UbtConfig _ ) => _
615+ . Project ( shortHostProjectDir / "HostProject.uproject" )
616+ . Apply ( Common )
617+ ;
618+ UbtConfig CommonPlugin ( UbtConfig _ ) => _
619+ . Plugin ( shortPluginDir / PluginPath . Name )
620+ . Apply ( Common )
616621 ;
617622
618623 foreach ( var platform in platforms )
619624 {
620- Log . Information ( "Building UnrealGame binaries for {0} @ {1}" , Name , platform ) ;
625+ Log . Information ( "Building UnrealGame binaries from UProject for {0} @ {1}" , Name , platform ) ;
626+ Unreal . BuildTool ( build , _ => _
627+ . Target ( "UnrealGame" , platform ,
628+ [
629+ UnrealConfig . Development ,
630+ UnrealConfig . Shipping
631+ ] )
632+ . Apply ( CommonProject )
633+ ) ( "" ) ;
634+ if ( platform . IsDevelopment )
635+ {
636+ Log . Information ( "Building UnrealEditor binaries for UProject {0} @ {1}" , Name , platform ) ;
637+ Unreal . BuildTool ( build , _ => _
638+ . Target ( "UnrealEditor" , platform , [ UnrealConfig . Development ] )
639+ . Apply ( CommonProject )
640+ ) ( "" ) ;
641+ }
642+ Log . Information ( "Building UnrealGame binaries from UPlugin for {0} @ {1}" , Name , platform ) ;
621643 Unreal . BuildTool ( build , _ => _
622644 . Target ( "UnrealGame" , platform ,
623645 [
624646 UnrealConfig . Development ,
625647 UnrealConfig . Shipping
626648 ] )
627- . Apply ( Common )
649+ . Apply ( CommonPlugin )
628650 ) ( "" ) ;
629651 if ( platform . IsDevelopment )
630652 {
631- Log . Information ( "Building UnrealEditor binaries for {0} @ {1}" , Name , platform ) ;
653+ Log . Information ( "Building UnrealEditor binaries for UPlugin {0} @ {1}" , Name , platform ) ;
632654 Unreal . BuildTool ( build , _ => _
633655 . Target ( "UnrealEditor" , platform , [ UnrealConfig . Development ] )
634- . Apply ( Common )
656+ . Apply ( CommonPlugin )
635657 ) ( "" ) ;
636658 }
637659 }
0 commit comments