protected override void OnEnable() { if (PrefabUtility.GetPrefabType(this) == PrefabType.Prefab) { EditorUpdate.onEditorUpdate -= OnEditorUpdate; return; } EditorUpdate.Init(); EditorUpdate.onEditorUpdate += OnEditorUpdate; m_GraphicRaycaster = GetComponent <GraphicRaycaster>(); if (m_GraphicRaycaster != null) { DestroyImmediate(m_GraphicRaycaster); } m_Canvas = GetComponent <Canvas>(); if (m_Canvas != null) { DestroyImmediate(m_Canvas); } }
/// <summary> /// Initializes a new instance of the <see cref="MaterialButton"/> class. /// </summary> public MaterialButton() { EditorUpdate.Init(); EditorUpdate.onEditorUpdate += OnEditorUpdate; }
/// <summary> /// Initializes a new instance of the <see cref="MaterialSlider"/> class. /// </summary> public MaterialSlider() { EditorUpdate.Init(); EditorUpdate.onEditorUpdate += OnEditorUpdate; }
public VectorImage() { EditorUpdate.Init(); EditorUpdate.onEditorUpdate += OnEditorUpdate; }