// Copyright UShaderLab. All Rights Reserved. using UnrealBuildTool; // The material-graph-building core: turns a parsed .usl model into a UMaterial expression graph and // triggers its compile. This is needed whenever the engine runs UNCOOKED data — the editor, AND a // `-game` / Standalone launch on the editor binary against an uncooked project (GIsEditor == false). // It must NOT be an `Editor`-type module (those are gated on GIsEditor and never load in `-game`, which // left base materials as empty shells and made instances fall back to the default material). `UncookedOnly` // loads iff `!RequiresCookedData()`, i.e. exactly the uncooked runs, and is excluded from cooked builds // (where instances carry their own shader maps and the runtime module's ApplySettings path suffices). // // Deliberately depends only on Engine/RenderCore/RHI/Projects/Json — NO UnrealEd/MaterialEditor/Slate — // so it is safe to load in `-game` where those editor-UI modules are not initialized. The editor-only UX // (factory, VSCode button, hot-reload watcher, open-editor refresh) stays in UShaderLabEditor. public class UShaderLabBuilder : ModuleRules { public UShaderLabBuilder(ReadOnlyTargetRules Target) : base(Target) { PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs; bUseUnity = false; PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", }); PrivateDependencyModuleNames.AddRange(new string[] { "UShaderLab", "RenderCore", "RHI", "Json", "Projects", }); } }