RaptorBasicPropCatalog
RAPTOR's built-in prop catalogue, used by the Props drawer when no project catalogue is registered.
| Namespace | Assembly | Kind | Stability |
|---|---|---|---|
Raptor.EditorTools | Raptor.Editor | class | preview, since 0.1.0 |
The Props drawer uses this catalogue while no project code sets RaptorPropTool.CatalogProvider. It lists every prefab and model under the folders set in Project Settings → RAPTOR → Props ("Prop folders", key FoldersKey).
Folders are scanned only when the drawer asks, and assets are not loaded; only paths and main-asset types are read. The folder list is stored through RaptorProjectSettings and saved only when the user changes it. The list is re-read after any project or folder change.
public static class RaptorBasicPropCatalogFields
Family
public const string Family;The single family in the drawer sidebar. Each configured folder is a pack under it.
FoldersKey
public const string FoldersKey;The project setting that holds the folder list (JSON, FolderList).
OutsideWords
public const string OutsideWords;The status text shown when the picked folder is outside this project.
Properties
EffectiveFamilyOrder
public static string[] EffectiveFamilyOrder { get; }Gets the sidebar family order for EffectiveProvider.
EffectiveProvider
public static Func<RaptorPropRecord[]> EffectiveProvider { get; }Gets the catalogue the drawer reads: the project's if registered, otherwise this one.
Folders
public static string[] Folders { get; }Gets the configured folders, normalised, in the order they were added. Unreadable entries are skipped.
InUse
public static bool InUse { get; }Whether the drawer uses this catalogue. True while no project catalogue is registered.
Methods
AddFolder
public static bool AddFolder(string path)Adds an existing project folder to the list. Changes memory only; the caller saves the settings.
| Parameter | Type | Description |
|---|---|---|
path | string | A project-relative folder. |
Returns: False when the path is refused, missing or already listed.
AddPickedFolder
public static bool AddPickedFolder()Shows the folder picker, adds the chosen folder and saves the project settings. Call it outside OnGUI, because the picker is modal.
Returns: True if a folder was added.
Invalidate
public static void Invalidate()Clears the cached records. While the catalogue is in use, the drawer re-reads on its next repaint.
NormaliseFolder
public static string NormaliseFolder(string path)Returns a project-relative folder path in its stored form: forward slashes, no empty segments and no trailing slash.
| Parameter | Type | Description |
|---|---|---|
path | string | A project-relative folder. |
Returns: The stored form, or null if the path is refused (empty, rooted, a drive path, a URL, or containing "." or ".." segments).
ProjectPathOf
public static string ProjectPathOf(string folder)Returns the project-relative path of an absolute folder from the picker, or the normalised path if it is already project-relative.
| Parameter | Type | Description |
|---|---|---|
folder | string | A folder path. |
Returns: The project-relative path, or null if the folder is outside the project.
Records
public static RaptorPropRecord[] Records()Returns every prefab and model under the configured folders as plain records, cached until the project or the folder list changes. An asset under two listed folders belongs to the deeper one.
Returns: The records.
RemoveFolder
public static bool RemoveFolder(string path)Removes a folder from the list. Changes memory only; the caller saves the settings.
| Parameter | Type | Description |
|---|---|---|
path | string | A project-relative folder. |
Returns: False when it was not listed.
Related types
- RaptorProjectSettings: RAPTOR's per-project settings file and the section registry for Project Settings → RAPTOR.
- RaptorPropRecord: One prop catalogue entry, as plain data.
- RaptorPropTool: Connects RAPTOR's prop placement (the Props drawer and Place tool) to the project's prop catalogue.