Get RAPTOR

RaptorMaterialTile

A Materials drawer tile as passed to an extension (IRaptorDockExtension).

NamespaceAssemblyKindStability
Raptor.EditorToolsRaptor.Editorstructpreview, since 0.1.0

A default tile has no GUID and refers to no material.

public readonly struct RaptorMaterialTile

Constructors

RaptorMaterialTile

public RaptorMaterialTile(string guid, string path, string name, string pack, bool isSpecial, bool isHotspotSheet)

Creates a tile with every field set.

ParameterTypeDescription
guidstringThe material's asset GUID.
pathstringThe material's asset path.
namestringThe display name.
packstringThe pack it belongs to.
isSpecialboolWhether the material is a Special tool material.
isHotspotSheetboolWhether the material is a listed hotspot sheet.

Fields

guid

public readonly string guid;

The material's asset GUID. Null or empty means no material.

isHotspotSheet

public readonly bool isHotspotSheet;

Whether the material is a hotspot sheet listed in the drawer's Hotspot section.

isSpecial

public readonly bool isSpecial;

Whether the material is one of RAPTOR's Special tool materials, such as Skybox, NoDraw or Block Light. Matched by asset identity.

name

public readonly string name;

The tile's display name.

pack

public readonly string pack;

The pack (library row) the tile belongs to.

path

public readonly string path;

The material's asset path.

Properties

IsValid

public bool IsValid { get; }

Whether the tile has a GUID and so refers to a material.

Methods

LoadMaterial

public Material LoadMaterial()

Loads the tile's material through the drawer's cache.

Returns: The material, or null when it is gone.

  • IRaptorDockExtension: A per-drawer extension of the Materials drawer (RaptorMaterialsDrawer.RegisterExtension).