Example #1
0
        public override void OnInspectorGUI()
        {
            base.OnInspectorGUI();

            _customBrush = (CustomBrush)target;
            _brushLogic.InitVars(_customBrush);

            // ---- Custom Buttons ----
            AddButtons();
        }
Example #2
0
        /// <summary>
        /// Store vars internally.
        /// </summary>
        public void InitVars(CustomBrush customBrush)
        {
            _scaleXZ    = customBrush.ScaleXZ;
            _scaleY     = customBrush.ScaleY;
            _prefabs    = customBrush.Prefabs;
            _justScaleY = customBrush.JustScaleY;
            _isTree     = customBrush.IsTree;

            // check if naming was changed and reset number
            if (_parentName != customBrush.ParentNaming)
            {
                _parentName = customBrush.ParentNaming;
                Reset();
            }
        }