Get RAPTOR

RaptorPackEntry

One row of the material library: a folder of materials shown as a pack in the Materials drawer.

NamespaceAssemblyKindStability
Raptor.EditorToolsRaptor.Editorclasspreview, since 0.1.0

Provider rows come from an IRaptorPackProvider. User rows are stored in the project settings (RaptorLibrary.SettingsKey). The pack name is a persistent key for sidebar state and collection ids, so keep it stable.

public sealed class RaptorPackEntry

Fields

enabled

public bool enabled;

Whether the pack is shown in the Materials drawer.

excludeSegments

public string[] excludeSegments;

Path segments, such as "/_Cache/", that exclude materials from the library. A material whose asset path contains any of them is left out.

folder

public string folder;

The project path of the pack folder ("Assets/..." or "Packages/...").

folderGuid

public string folderGuid;

Optional GUID of the pack folder. When it resolves to a folder, it takes precedence over folder, so the row still works after a folder rename.

group

public string group;

The sidebar heading the pack is listed under. Empty for a top-level pack. A SubfoldersArePacks row with no group uses its name.

layout

public RaptorPackLayout layout;

How the pack's folders map to categories.

licence

public string licence;

The pack's licence text, shown in settings and read by the content gates.

manifest

public string manifest;

Optional colour manifest file in each pack folder. Each line holds a tab-separated name, colour, variant and family. '#' starts a comment.

name

public string name;

The pack's name for the Categories layout, shown in the sidebar and in search.

namePrefix

public string namePrefix;

For the SubfoldersArePacks layout, each pack is named this prefix plus the subfolder name. The sidebar shows the subfolder name.

tileMetres

public float tileMetres;

When greater than 0, each material in the pack is a texture tile of this many metres, and Align sizes it to match. When 0, materials are sized by their pixels.

Properties

Heading

public string Heading { get; }

The sidebar heading for this row's packs. Empty for a top-level pack.

IsProviderRow

public bool IsProviderRow { get; }

Whether a provider added this row. Provider rows are read-only in settings.

ResolvedFolder

public string ResolvedFolder { get; }

The pack folder in use. This is the folder folderGuid resolves to, otherwise folder, with forward slashes and no trailing slash.

Source

public string Source { get; }

The id of the provider that added the row, or RaptorLibrary.SettingsSource for a user row.

Methods

Clone

public RaptorPackEntry Clone()

Creates a copy of this row.

Returns: The copy.

  • IRaptorPackProvider: Adds packs to the material library from code.
  • RaptorPackLayout: How a pack folder is read into the material library.
  • RaptorLibrary: The material library behind the Materials drawer: provider rows, then user rows from the project settings.