Class GraphicEditor
Editor class used to edit UI Graphics. Extend this class to write your own graphic editor.
Inherited Members
Editor.MoveNextTarget()
Object.InstantiateAsync<T>(T)
Object.InstantiateAsync<T>(T, Transform)
Object.InstantiateAsync<T>(T, Vector3, Quaternion)
Object.InstantiateAsync<T>(T, Transform, Vector3, Quaternion)
Object.Instantiate(Object, Scene)
Object.FindObjectsByType<T>(FindObjectsSortMode)
Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)
Object.FindFirstObjectByType<T>()
Object.FindAnyObjectByType<T>()
Object.FindFirstObjectByType<T>(FindObjectsInactive)
Object.FindAnyObjectByType<T>(FindObjectsInactive)
Namespace: UnityEditor.UI
Assembly: UnityEditor.UI.dll
Syntax
[CustomEditor(typeof(MaskableGraphic), false)]
[CanEditMultipleObjects]
public class GraphicEditor : Editor
Fields
m_Color
Declaration
protected SerializedProperty m_Color
Field Value
Type | Description |
---|---|
SerializedProperty |
m_Maskable
Declaration
protected SerializedProperty m_Maskable
Field Value
Type | Description |
---|---|
SerializedProperty |
m_Material
Declaration
protected SerializedProperty m_Material
Field Value
Type | Description |
---|---|
SerializedProperty |
m_RaycastPadding
Declaration
protected SerializedProperty m_RaycastPadding
Field Value
Type | Description |
---|---|
SerializedProperty |
m_RaycastTarget
Declaration
protected SerializedProperty m_RaycastTarget
Field Value
Type | Description |
---|---|
SerializedProperty |
m_Script
Declaration
protected SerializedProperty m_Script
Field Value
Type | Description |
---|---|
SerializedProperty |
m_ShowNativeSize
Declaration
protected AnimBool m_ShowNativeSize
Field Value
Type | Description |
---|---|
AnimBool |
Methods
AppearanceControlsGUI()
GUI related to the appearance of the Graphic. Color and Material properties appear here.
Declaration
protected void AppearanceControlsGUI()
MaskableControlsGUI()
Declaration
protected void MaskableControlsGUI()
NativeSizeButtonGUI()
GUI for showing a button that sets the size of the RectTransform to the native size for this Graphic.
Declaration
protected void NativeSizeButtonGUI()
OnDisable()
Declaration
protected virtual void OnDisable()
OnEnable()
Declaration
protected virtual void OnEnable()
OnInspectorGUI()
Declaration
public override void OnInspectorGUI()
Overrides
RaycastControlsGUI()
GUI related to the Raycasting settings for the graphic.
Declaration
protected void RaycastControlsGUI()
SetShowNativeSize(bool, bool)
Set if the 'Set Native Size' button should be visible for this editor.
Declaration
protected void SetShowNativeSize(bool show, bool instant)
Parameters
Type | Name | Description |
---|---|---|
bool | show | Are we showing or hiding the AnimBool for the size. |
bool | instant | Should the size AnimBool change instantly. |