Get RAPTOR

IRaptorDockExtension

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

NamespaceAssemblyKindStability
Raptor.EditorToolsRaptor.Editorinterfacepreview, since 0.1.0

Each open drawer creates its own instance on first use and disposes of it when the drawer closes. Members are called on the editor's GUI thread, in registration order.

public interface IRaptorDockExtension : IDisposable

Properties

HasUnsavedWork

bool HasUnsavedWork { get; }

Whether the extension has unsaved work. The Materials tab shows a dot while this is true.

Read by RAPTOR.

Methods

AppendTileMenu

void AppendTileMenu(RaptorSuiteControls.Menu menu, RaptorMaterialTile tile, Material material)

Adds rows to a tile's context menu, after the palette rows and before "Default for unpainted faces".

ParameterTypeDescription
menuRaptorSuiteControls.MenuThe menu being built.
tileRaptorMaterialTileThe tile.
materialMaterialThe tile's material.

Called by RAPTOR.

OnGUI

bool OnGUI(ref Rect area)

Called at the start of every drawer GUI event. Return true to take the whole area and skip the tile grid for that event. To draw a strip and keep the grid, shrink area by the strip and return false.

ParameterTypeDescription
arearef RectThe drawer's area. Shrink it by any strip the extension draws.

Returns: True to take the whole area.

Called by RAPTOR.

TryTakeTileClick

bool TryTakeTileClick(RaptorMaterialTile tile)

Called when a tile is clicked. Return true to handle the click, in which case the material is not applied.

ParameterTypeDescription
tileRaptorMaterialTileThe tile.

Returns: True to handle the click.

Called by RAPTOR.