Legacy Documentation: Version 4.6.2
Language: English
  • C#
  • JS
  • Boo

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

SelectableEditor

Namespace: UnityEditor.UI

/

Inherits from: Editor

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

Sumbission failed

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

Close

Cancel

Description

Custom Editor for the Selectable Component.

Extend this class to write a custom editor for an Selectable-derived component. See Also: Editor, CustomEditor.

Functions

OnInspectorGUI See Editor.OnInspectorGUI.

Inherited members

Variables

serializedObject A SerializedObject representing the object or objects being inspected.
target The object being inspected.
targets An array of all the object being inspected.
hideFlags Should the object be hidden, saved with the scene or modifiable by the user?
name The name of the object.

Functions

DrawDefaultInspector Draw the built-in inspector.
DrawHeader Call this function to draw the header of the editor.
DrawPreview The first entry point for Preview Drawing.
GetInfoString Implement this method to show asset information on top of the asset preview.
GetPreviewTitle Override this method if you want to change the label of the Preview area.
HasPreviewGUI Override this method in subclasses if you implement OnPreviewGUI.
OnInteractivePreviewGUI Implement to create your own interactive custom preview. Interactive custom previews are used in the preview area of the inspector and the object selector.
OnPreviewGUI Implement to create your own custom preview for the preview area of the inspector, primary editor headers and the object selector.
OnPreviewSettings Override this method if you want to show custom controls in the preview header.
RenderStaticPreview Override this method if you want to render a static preview that shows.
Repaint Repaint any inspectors that shows this editor.
RequiresConstantRepaint Does this edit require to be repainted constantly in its current state?
UseDefaultMargins Override this method in subclasses to return false if you don't want default margins.
GetInstanceID Returns the instance id of the object.
ToString Returns the name of the game object.

Static Functions

CreateEditor Make a custom editor for obj or objects.
Destroy Removes a gameobject, component or asset.
DestroyImmediate Destroys the object obj immediately. You are strongly recommended to use Destroy instead.
DontDestroyOnLoad Makes the object target not be destroyed automatically when loading a new scene.
FindObjectOfType Returns the first active loaded object of Type type.
FindObjectsOfType Returns a list of all active loaded objects of Type type.
Instantiate Clones the object original and returns the clone.
CreateInstance Creates an instance of a scriptable object with className.

Operators

bool Does the object exist?
operator != Compares if two objects refer to a different object.
operator == Compares if two objects refer to the same.

Messages

OnSceneGUI Lets the Editor handle an event in the scene view.
OnDestroy This function is called when the scriptable object will be destroyed.
OnDisable This function is called when the scriptable object goes out of scope.
OnEnable This function is called when the object is loaded.