protected override void OnEnable()
        {
            base.OnEnable();

            _entryList = new SPReorderableList(this.serializedObject, this.serializedObject.FindProperty(PROP_ENTRIES));
            _entryList.drawHeaderCallback  = this._entryList_DrawHeader;
            _entryList.drawElementCallback = this._entryList_DrawElement;
        }
        protected override void OnEnable()
        {
            base.OnEnable();

            _targetList = new SPReorderableList(this.serializedObject, this.serializedObject.FindProperty(PROP_TARGETS), true, true, true, true);
            _targetList.drawHeaderCallback  = _targetList_DrawHeader;
            _targetList.drawElementCallback = _targetList_DrawElement;
            _targetList.onAddCallback       = _targetList_OnAdd;
        }
        protected override void OnEnable()
        {
            base.OnEnable();

            _dataList = new SPReorderableList(this.serializedObject, this.serializedObject.FindProperty(PROP_TWEENDATA));
            _dataList.drawHeaderCallback  = _dataList_DrawHeader;
            _dataList.drawElementCallback = _dataList_DrawElement;
            _dataList.elementHeight       = EditorGUIUtility.singleLineHeight * 6f + 7f;
        }
        protected override void OnEnable()
        {
            base.OnEnable();

            _lst = new SPReorderableList(this.serializedObject, this.serializedObject.FindProperty("_prefabs"), true, true, true, true);
            _lst.drawHeaderCallback  = this._prefabList_DrawHeader;
            _lst.drawElementCallback = this._prefabList_DrawElement;
            _lst.onAddCallback       = this._prefabList_OnAdded;
        }
Example #5
0
        protected override void OnEnable()
        {
            base.OnEnable();

            _lst = new SPReorderableList(this.serializedObject, this.serializedObject.FindProperty("_text"));
            _lst.drawHeaderCallback  += _maskList_DrawHeader;
            _lst.drawElementCallback += _maskList_DrawElement;
            _lst.elementHeight        = EditorGUIUtility.singleLineHeight * 4f;
        }
        protected override void OnEnable()
        {
            base.OnEnable();

            _animList = new SPReorderableList(this.serializedObject, this.serializedObject.FindProperty(PROP_ANIMATIONS), true, true, true, true);
            _animList.drawHeaderCallback  = this._animList_DrawHeader;
            _animList.drawElementCallback = this._animList_DrawElement;
            _animList.onAddCallback       = this._animList_OnAdded;
            _animList.onRemoveCallback    = this._animList_OnRemoved;

            _animList.draggable     = !Application.isPlaying;
            _animList.displayAdd    = !Application.isPlaying;
            _animList.displayRemove = !Application.isPlaying;
        }
Example #7
0
        protected override void OnEnable()
        {
            base.OnEnable();

            var timeLayersData = this.target as CustomTimeLayersData;

            if (timeLayersData != null)
            {
                _timeLayersHelper     = new CustomTimeLayersData.EditorHelper(timeLayersData);
                _timeLayersListDrawer = new SPReorderableList(_timeLayersHelper.Layers, typeof(string));
                _timeLayersListDrawer.drawHeaderCallback  = _timeLayersList_DrawHeader;
                _timeLayersListDrawer.drawElementCallback = _timeLayers_DrawElement;
                _timeLayersListDrawer.onAddCallback       = _timeLayers_AddElement;
            }
        }
Example #8
0
        protected override void OnEnable()
        {
            base.OnEnable();

            _targ = this.target as WaypointPathComponent;

            _nodesProp = this.serializedObject.FindProperty(PROP_WAYPOINTS);
            _nodeList = new SPReorderableList(this.serializedObject, _nodesProp);
            _nodeList.elementHeight = EditorGUIUtility.singleLineHeight;
            _nodeList.drawHeaderCallback = _nodeList_DrawHeader;
            _nodeList.drawElementCallback = _nodeList_DrawElement;
            _nodeList.onAddCallback = _nodeList_OnAdded;

            _currentNodes = this.GetCurrentNodes();
            _lastNodeCache.Clear();
            _lastNodeCache.AddRange(_currentNodes);
        }
Example #9
0
        protected override void OnEnable()
        {
            base.OnEnable();

            this.serializedObject.Update();
            this.NormalizeActionAndWeightArrays();

            _weightDrawer             = new DiminishingWeightOverDurationPropertyDrawer();
            _weightDrawer.DrawFoldout = false;

            _lst                      = new SPReorderableList(this.serializedObject, this.serializedObject.FindProperty(PROP_ACTIONS));
            _lst.displayAdd           = false;
            _lst.displayRemove        = false;
            _lst.draggable            = false;
            _lst.drawHeaderCallback  += this.OnDrawHeader;
            _lst.drawElementCallback += this.OnDrawElement;
            _lst.elementHeight        = EditorGUIUtility.singleLineHeight * 2f + 3f;
        }
        private void Init(SerializedProperty property, bool searchForAttribs)
        {
            if (_maskList == null)
            {
                _maskList = new SPReorderableList(property.serializedObject, property.FindPropertyRelative(PROP_ANIMSTATE_MASKS), true, true, true, true);
                _maskList.drawHeaderCallback  = this._maskList_DrawHeader;
                _maskList.drawElementCallback = this._maskList_DrawElement;
            }
            else
            {
                _maskList.serializedProperty = property.FindPropertyRelative(PROP_ANIMSTATE_MASKS);
            }

            _detailProps = FULL_DETAIL_PROPS;
            if (searchForAttribs && this.fieldInfo != null)
            {
                var readonlyNameAttrib = this.fieldInfo.GetCustomAttributes(typeof(SPAnimClip.ReadOnlyNameAttribute), false).FirstOrDefault() as SPAnimClip.ReadOnlyNameAttribute;
                if (readonlyNameAttrib != null)
                {
                    property.FindPropertyRelative(PROP_NAME).stringValue = readonlyNameAttrib.Name;
                    _nameIsReadOnly = true;
                }
                else
                {
                    _nameIsReadOnly = false;
                }

                var configAttrib = this.fieldInfo.GetCustomAttributes(typeof(SPAnimClip.ConfigAttribute), false).FirstOrDefault() as SPAnimClip.ConfigAttribute;
                if (configAttrib != null)
                {
                    if (configAttrib.HideDetailRegion)
                    {
                        _detailProps = null;
                    }
                    else if (configAttrib.VisibleProps != null && configAttrib.VisibleProps.Length > 0)
                    {
                        _detailProps = configAttrib.VisibleProps;
                    }
                }
            }
        }
        private void OnEnable()
        {
            if (_openWindow == null)
            {
                _openWindow = this;
            }
            else
            {
                Object.DestroyImmediate(this);
            }

            this.titleContent = new GUIContent("Advanced Input Manager");

            var asset = AssetDatabase.LoadAllAssetsAtPath("ProjectSettings/InputManager.asset").FirstOrDefault();

            if (asset != null)
            {
                _inputManagerAsset            = new SerializedObject(asset);
                _axesList                     = new SPReorderableList(_inputManagerAsset, _inputManagerAsset.FindProperty(PROP_AXES));
                _axesList.elementHeight       = EditorGUIUtility.singleLineHeight;
                _axesList.drawHeaderCallback  = _axesList_DrawHeader;
                _axesList.drawElementCallback = _axesList_DrawElement;
            }
        }