DreamShaderLang
Parameters

Asset References

Path(Root, "…") — every root spelling, how the object path is completed, the two resolvers that disagree, and both error sets.

Path(…) is how source code names an existing Unreal asset: a package root plus a relative path, resolved to a full object path at generation time.

Path( <root> , "<relative-path>" )
Path( "<absolute-path>" )
"<absolute-path>"
Texture2D A = Path(Game, "Textures/T_X");
Texture2D B = Path("Plugin.MyPlugin", "Textures/T_X");
Texture2D C = Path("/Game/Textures/T_X");
Texture2D D = "/Game/Textures/T_X";              // bare quoted form

The root may be written quoted or bare. The bare quoted path form arrived in since 1.5.0; the Plugin. / Plugins. roots have existed since since 1.2.0.

You will meet Path(…) in four places:

WhereExample
The = <default> of a texture propertyTexture2D T = Path(Game, "T_X");
An object-valued metadata entry[Curve = Path(Game, "Curves/CV_Ramp")]
A UE.CollectionParam argumentUE.CollectionParam(Collection = Path(Game, "MPC_World"), Parameter = "Wind")
A VirtualFunction's Options.AssetOptions = { Asset = Path(Game, "Functions/MF_X"); }
An object-typed material settingPhysicalMaterial = Path(Engine, "EngineMaterials/DefaultPhysicalMaterial");

Roots

The root argument is unquoted, \ is folded to /, and leading and trailing / are stripped; the result is split on /. The first segment names the root.

Root spellingResolves to
Game/Game
Engine/Engine
Plugin.<Name>the plugin's mounted asset path
Plugins.<Name>the plugin's mounted asset path
Plugin/<Name>the plugin's mounted asset path — consumes two segments
Plugins/<Name>the plugin's mounted asset path — consumes two segments

All spellings are matched case-insensitively; any other first segment fails.

Segments after the root are appended as folders. Path("Game/Textures", "T_X") resolves to /Game/Textures/T_X, and Path("Plugin/MyPlugin/Materials", "MF_X") to /MyPlugin/Materials/MF_X.

A plugin root resolves through the plugin's own mounted asset path, normalized the same way (backslashes folded, trailing / stripped, a leading / added). If that path is empty or just /, /<PluginName> is used instead.

Object-path completion

After the root and the relative path are joined, the result is completed to a full object path: if the text after the last / contains no ., the asset name is appended after a ..

WrittenResolved
Path(Game, "Textures/T_X")/Game/Textures/T_X.T_X
Path(Game, "Textures/T_X.T_X")/Game/Textures/T_X.T_X
"/Game/Textures/T_X"/Game/Textures/T_X.T_X

The completed path is finally validated by Unreal's own object-path validator, whose message is reported verbatim when it fails.

Two resolvers

There are two independent implementations with different accepted forms and different error text. Which one runs depends on where the reference appears.

Where the reference appearsResolverMessages begin
The = <default> of a compact texture token, a TextureObjectParameter-family token, or a TextureSampleParameter*-family tokentexture-default resolverTexture …
An object-valued metadata entry — [Texture=…], [Curve=…], [Font=…], [VirtualTexture=…], …asset-reference resolverAsset …
UE.CollectionParam(Collection = …) / UE.CollectionParameter(Asset = …)asset-reference resolverAsset …
A VirtualFunction's Options = { Asset = …; }asset-reference resolverAsset …

Where they differ

BehaviourTexture-default resolverAsset-reference resolver
Path(root, "path")acceptedaccepted
Path("/absolute/path")acceptedaccepted
"/absolute/path" (bare quoted)acceptedaccepted
/absolute/path (bare unquoted)rejected — the value must start with Path or "accepted
Path(…) with 3+ argumentsthe third argument is never read; the missing ) is reportedrejected with an explicit arity message
Root and an absolute asset paththe root is still prepended, producing /Game/Game/…the root is ignored; the absolute path wins
Plugin-name validationcharacters must be alphanumeric or _the name must survive Unreal's object-name sanitizer unchanged
Plugin Content directory must existnot checkedchecked
Plugin content must be mountednot checkedchecked since UE 5.6

Do not combine a root with an absolute path in a texture default. Texture2D T = Path(Game, "/Game/Textures/T_X"); resolves to /Game/Game/Textures/T_X.T_X and then fails to load. Write Path(Game, "Textures/T_X") or Path("/Game/Textures/T_X"). The same expression is accepted in a metadata entry, because that resolver drops the root when the path is absolute — the two forms are not interchangeable.

String escapes

Quoted paths are string literals. Both resolvers recognize \n, \r, \t, \" and \\; any other \X yields the literal X. See Lexical Elements.

Loading is a separate step

Resolving a path produces text. Whether the asset then loads is a separate step, and the outcome depends on the slot:

SlotAsset fails to load
A compact texture token's defaultTexture property '{Name}' could not load asset '{Path}'.
A const texture token's defaultConst texture property '{Name}' could not load asset '{Path}'.
The engine fallback asset for a dimensionTexture property '{Name}' could not load default {Type} asset '{Path}'.
A metadata object property named Texture or TextureObject whose type is a UTexture subclasssilently written as nullptr, reported as success
Any other metadata object propertyFailed to load asset '{Path}' for '{Property}'.
UE.CollectionParam's CollectionCould not load MaterialParameterCollection '{Path}'.

The silent-null case is the one to watch: [Texture = Path(Game, "Typo")] generates without any diagnostic and leaves the sampler unbound, which surfaces later as an Unreal shader-compile error. A path that resolves is not a path that exists.

Diagnostics

Texture-default resolver

MessageCause
Texture defaults must use Path(Game|Engine|Plugin.PluginName, "/Folder/Asset"), Path("/Game/Folder/Asset"), or a bare "/Game/Folder/Asset".The value is neither a quoted string nor a call to Path.
Unexpected trailing tokens after texture Path(...) reference.Text after the closing ).
Texture Path(...) requires a non-empty asset path.The asset-path argument is empty.
Relative texture Path(...) references require a root such as Game, Engine, or Plugin.PluginName.A relative path with no root, including a bare quoted relative path.
Unsupported texture Path root '{Root}'. Use Game, Engine, or Plugin.PluginName.The first root segment is none of the six accepted spellings.
Texture Path root '{Root}' has an invalid plugin name.The plugin name contains a character other than a letter, digit or _.
Texture Path root '{Root}' references plugin '{Plugin}', but no enabled plugin with that name was found.The plugin manager does not know the plugin.
Texture Path root '{Root}' references plugin '{Plugin}', but the plugin is not enabled.The plugin exists but is disabled.
Texture Path root '{Root}' references plugin '{Plugin}', but the plugin cannot contain content.The plugin declares no content.
Invalid texture asset path '{Path}'.The joined path has no /, or ends with one.

Unreal's own object-path validation message is reported verbatim when the completed path is not a valid object path. The caller wraps every message above:

WrapperApplied to
Invalid texture default value '{Text}' for property '{Name}'. {Inner}compact texture tokens and the TextureObjectParameter family
Invalid texture sample default value '{Text}' for property '{Name}'. {Inner}the eight texture-sample tokens

Asset-reference resolver

MessageCause
Asset reference cannot be empty.The value is empty after trimming.
Asset Path(...) reference is missing a closing ')'.A value beginning with Path( that does not end with ).
Asset Path(...) contains an unterminated string literal.An unclosed " inside the argument list.
Asset Path(...) expects either 1 argument (/Game/... path) or 2 arguments (Game|Engine|Plugin.PluginName, asset path).Three or more arguments. An empty Path() counts as one empty argument and fails with the next message instead.
Asset reference requires a non-empty path.The asset-path argument is empty.
Relative asset Path(...) references require a root such as Game, Engine, or Plugin.PluginName.A relative path with no root.
Unsupported asset Path root '{Root}'. Use Game, Engine, or Plugin.PluginName.The first root segment is none of the six accepted spellings.
Asset Path root '{Root}' has an invalid plugin name.The plugin name is empty, or is changed by Unreal's object-name sanitizer.
Asset Path root '{Root}' references plugin '{Plugin}', but no enabled plugin with that name was found.The plugin manager does not know the plugin.
Asset Path root '{Root}' references plugin '{Plugin}', but the plugin is not enabled.The plugin exists but is disabled.
Asset Path root '{Root}' references plugin '{Plugin}', but the plugin cannot contain content.The plugin declares no content.
Asset Path root '{Root}' references plugin '{Plugin}', but its Content directory does not exist: '{Dir}'.The plugin's Content folder is missing on disk.
Asset Path root '{Root}' references plugin '{Plugin}', but the plugin content is not mounted.The plugin's content is not mounted (UE 5.6+).
Invalid asset path '{Path}'.The joined path has no /, or ends with one.

The complete cross-stage list is in Diagnostics.

Example

Shader(Name="Docs/M_Paths")
{
    Properties = {
        // Root + relative path — the canonical form.
        Texture2D A = Path(Game, "Textures/T_White");

        // Quoted root, and extra folder segments carried by the root.
        Texture2D B = Path("Game/Textures", "T_Noise");

        // Engine content.
        TextureCube C = Path(Engine, "EngineResources/DefaultTextureCube");

        // Plugin content: both spellings resolve identically.
        Texture2D D = Path(Plugin.DreamShader, "Textures/T_Probe");
        Texture2D E = Path("Plugins/DreamShader", "Textures/T_Probe");

        // Single-argument and bare quoted forms — both must be absolute.
        Texture2D F = Path("/Game/Textures/T_White");
        Texture2D G = "/Game/Textures/T_White";

        // The asset-reference resolver, reached through metadata.
        CurveAtlasRowParameter Row = float3(0.5, 0.5, 0.5) [
            Curve = Path(Game, "Curves/CV_Ramp");
            Atlas = Path(Game, "Curves/CA_Ramps")
        ];

        // The asset-reference resolver, reached through a UE builtin argument.
        UE.CollectionParam(Collection = Path(Game, "Collections/MPC_World"),
                           Parameter  = "WindStrength") Wind;
    }

    Settings = { Domain = "Surface"; ShadingModel = "Unlit"; BlendMode = "Opaque"; }
    Outputs  = { vec3 Color; Base.EmissiveColor = Color; }

    Graph = {
        Color = vec3(Wind, Wind, Wind);
    }
}

Resolved object paths:

A  /Game/Textures/T_White.T_White
B  /Game/Textures/T_Noise.T_Noise
C  /Engine/EngineResources/DefaultTextureCube.DefaultTextureCube
D  /DreamShader/Textures/T_Probe.T_Probe          (plugin mounted asset path)
E  /DreamShader/Textures/T_Probe.T_Probe
F  /Game/Textures/T_White.T_White
G  /Game/Textures/T_White.T_White

Next

On this page