| Parameter | Description |
|---|---|
| key | A unique string that identifies the selection handler. |
| handler | A function that handles custom non-Object based selection in selection history. |
| validator | A function that validates custom non-Object based selection in selection history. Use the Validator to confirm that the given selection represented by customData is still valid within the given window (optional). |
Registers a handler for custom non-Object based selection in selection history.
The Editor's selection history normally tracks only regular Object-based selection. If you have an Editor window or an Editor tool that has a custom "selection" concept and you want that to participate in the selection history, use Selection.RegisterCustomHandler and Selection.SetCustomSelection.
Unity calls this handler when a user navigates back to a selection entry that was recorded with SetCustomSelection.
The handler decodes the custom selection data from customData string, and can optionally use the passed selectedObjects EntityIDs.
Additional resources: Selection.RegisterCustomHandler, Selection.SetCustomSelection.