Version: Unity 6.6 Alpha (6000.6)
LanguageEnglish
  • C#

Selection.RegisterCustomHandler(string,CustomHandler,Texture)

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Parameters

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).

Description

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.