Reflection over the shader libraries the engine has loaded.
A library's bundle is parsed once, the first time it is asked for, from the asset or bytes it was loaded from; the parse is cached for the library's lifetime. Shader objects are mapped back to their entry names so a material's shader can be described.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
bundleInfoFor(
ShaderLibrary library) → ShaderBundleInfo? -
The parsed bundle for
libraryonce loadBundleInfo has completed, else null. -
infoFor(
Shader shader) → ShaderInfo? -
Reflection for
shader, or null before its library's bundle info loaded. -
invalidate(
ShaderLibrary library) → void -
Forgets the parse for
library, so the next loadBundleInfo re-reads it (after a hot reload rewrote the bundle). -
libraryOf(
Shader shader) → ShaderLibrary? -
The library
shadercame from, or null before its bundle info loaded. -
loadAll(
{AssetBundle? bundle}) → Future< List< ShaderBundleInfo> > - Loads bundle info for every library the engine has loaded so far, so every shader object maps to its name. Libraries whose bundle cannot be read are skipped.
-
loadBundleInfo(
ShaderLibrary library, {AssetBundle? bundle}) → Future< ShaderBundleInfo?> -
Parses
library's bundle (once) and maps its shader objects to their entry names. Null when the library's source is unknown (it was not loaded through the engine's loaders) or the asset cannot be read. -
nameOf(
Shader shader) → String? -
The bundle entry name of
shader, or null before its library's bundle info has loaded. -
sourceOf(
Shader shader, {ShaderBackend? backend}) → ShaderSource? -
The compiled output of
shaderforbackend(the running platform's by default), or null when unavailable.