private void OnUndo()
        {
            settings = ((DynamicPanelsCanvas)target).Internal;

            selectedAnchoredPanel     = settings.InitialPanelsAnchored;
            selectedAnchoredPanelTabs = selectedAnchoredPanel.panel.tabs;
        }
Esempio n. 2
0
        private void OnEnable()
        {
            settings = ((DynamicPanelsCanvas)target).Internal;

            reorderableLists      = new List <ReorderableList>();
            selectedAnchoredPanel = settings.InitialPanelsAnchored;

            minimumFreeSpace         = serializedObject.FindProperty("minimumFreeSpace");
            panelResizableAreaLength = serializedObject.FindProperty("m_panelResizableAreaLength");
            canvasAnchorZoneLength   = serializedObject.FindProperty("m_canvasAnchorZoneLength");
            panelAnchorZoneLength    = serializedObject.FindProperty("m_panelAnchorZoneLength");

            Undo.undoRedoPerformed -= OnUndo;
            Undo.undoRedoPerformed += OnUndo;
        }
        private void OnEnable()
        {
            settings = ((DynamicPanelsCanvas)target).Internal;

            reorderableLists          = new List <ReorderableList>();
            selectedAnchoredPanel     = settings.InitialPanelsAnchored;
            selectedAnchoredPanelTabs = selectedAnchoredPanel.panel.tabs;

            leaveFreeSpace           = serializedObject.FindProperty("m_leaveFreeSpace");
            minimumFreeSpace         = serializedObject.FindProperty("minimumFreeSpace");
            panelResizableAreaLength = serializedObject.FindProperty("m_panelResizableAreaLength");
            canvasAnchorZoneLength   = serializedObject.FindProperty("m_canvasAnchorZoneLength");
            panelAnchorZoneLength    = serializedObject.FindProperty("m_panelAnchorZoneLength");

            showIDs = EditorPrefs.GetBool(SHOW_IDS_PREF, false);

            Undo.undoRedoPerformed -= OnUndo;
            Undo.undoRedoPerformed += OnUndo;
        }