Description

Fix for [Link Removed] sets the RuleAssembly in the Marketplace plugin to ReadOnly. This has prevented the plugin binaries from being compiled.

Change the readonly flag as shown in the following code, UBT can compile the market plugin.

		private static RulesAssembly CreateMarketplaceRulesAssembly(IReadOnlyList<PluginInfo> Plugins, bool bSkipCompile, bool bForceCompile, RulesAssembly Parent)
		{
			RulesScope MarketplaceScope = new RulesScope("Marketplace", Parent.Scope);

			// Add all the plugin modules too (don't need to loop over RootDirectories since the plugins come in already found
			Dictionary<FileReference, ModuleRulesContext> ModuleFileToContext = new Dictionary<FileReference, ModuleRulesContext>();
			using (GlobalTracer.Instance.BuildSpan("Finding marketplace plugin modules").StartActive())
			{
				ModuleRulesContext PluginsModuleContext = new ModuleRulesContext(MarketplaceScope, Unreal.EngineDirectory);
				FindModuleRulesForPlugins(Plugins, PluginsModuleContext, ModuleFileToContext);
			}

			// Create the assembly
			RulesAssembly Result = Parent;
			if (ModuleFileToContext.Count > 0)
			{
				FileReference AssemblyFileName = FileReference.Combine(UnrealBuildTool.WritableEngineDirectory, "Intermediate", "Build", "BuildRules", "MarketplaceRules.dll");
//				Result = new RulesAssembly(MarketplaceScope, new List<DirectoryReference> { DirectoryReference.Combine(Unreal.EngineDirectory, "Plugins", "Marketplace") }, Plugins, ModuleFileToContext, new List<FileReference>(), AssemblyFileName, bContainsEngineModules: true, DefaultBuildSettings: BuildSettingsVersion.Latest, bReadOnly: true, bSkipCompile: bSkipCompile, bForceCompile: bForceCompile, Parent: Parent);
				Result = new RulesAssembly(MarketplaceScope, new List<DirectoryReference> { DirectoryReference.Combine(Unreal.EngineDirectory, "Plugins", "Marketplace") }, Plugins, ModuleFileToContext, new List<FileReference>(), AssemblyFileName, bContainsEngineModules: true, DefaultBuildSettings: BuildSettingsVersion.Latest, bReadOnly: false, bSkipCompile: bSkipCompile, bForceCompile: bForceCompile, Parent: Parent);
			}
			return Result;
		}

Steps to Reproduce
  1. Obtain Datasmith Twinmotion Importer plugin from Marketplace.
  2. Install plugin to ue5 launcher build
  3. Copy entire root/Engine/Binary/Plugins/Marketplace folder to local source build engine
  4. Delete Marketplace/TwinmotiontoUnreal/Binaries folder
  5. Create a C++ project in the source build engine
  6. Enable the Datasmith Twinmotion Importer plugin and close the editor.
  7. Open Visual Studio solition , build and Run

Result:

Compilation succeeds, but the binary is not compiled and fails to launch the editor.

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-152647 in the post.

0
Login to Vote

Fixed
ComponentUE - Foundation - Cpp Tools - UnrealBuildTool
Affects Versions5.05.0.1
Target Fix5.1
Fix Commit20558829
Main Commit20558829
CreatedMay 17, 2022
ResolvedJun 8, 2022
UpdatedJul 11, 2022