class

AssetReference

The value produced by the AssetRefs.Asset, AssetRefs.Asset, AssetRefs.Builtin, or AssetRefs.Builtin authoring factories — an asset reference authored by either a readable project path (e.g. Asset("Assets/Materials/Red.mat")), a sub-object of an imported project asset (e.g. Asset("Assets/Models/Barrel.fbx", "BarrelMesh")), or the name of a Unity built-in resource (e.g. Builtin("Cube")).

public sealed class AssetReference

Compile-time scaffolding only. SceneBuilder parses the builder SOURCE TEXT (it never runs the builder), resolving the authored path/name to the asset's GUID at build time; this object carries no runtime state. A cleared/None reference is authored as Asset(null).

Members

Asmethod

public T As<T>()

This asset reference, typed as T so it can be written as a UnityEvent listener's object argument (e.g. m.SetMaterial(Assets.Materials.Red.As<UnityEngine.Material>())). Compile-time cast scaffolding only — it performs no work at runtime.

Generated from com.codescenes/Runtime/AssetReference.cs