Exemplo n.º 1
0
        protected override void OnEnable()
        {
            if (PrefabUtility.GetPrefabType(this) == PrefabType.Prefab)
            {
                EditorUpdate.onEditorUpdate -= OnEditorUpdate;
                return;
            }

            EditorUpdate.Init();
            EditorUpdate.onEditorUpdate += OnEditorUpdate;
        }
        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);
            }
        }
Exemplo n.º 3
0
 public MaterialButton()
 {
     EditorUpdate.Init();
     EditorUpdate.onEditorUpdate += OnEditorUpdate;
 }
Exemplo n.º 4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MaterialUIScaler"/> class.
 /// </summary>
 public MaterialUIScaler()
 {
     EditorUpdate.Init();
     EditorUpdate.onEditorUpdate += CheckScaleFactor;
 }
Exemplo n.º 5
0
 public MaterialSlider()
 {
     EditorUpdate.Init();
     EditorUpdate.onEditorUpdate += OnEditorUpdate;
 }
Exemplo n.º 6
0
 public MaterialInputField()
 {
     EditorUpdate.Init();
     EditorUpdate.onEditorUpdate += OnEditorUpdate;
 }
Exemplo n.º 7
0
 public VectorImage()
 {
     EditorUpdate.Init();
     EditorUpdate.onEditorUpdate += OnEditorUpdate;
 }