private void OnEnable()
        {
            _labelStyle          = new GUIStyle(EditorStyles.label);
            _labelStyle.richText = true;

            _target = target as AssetsPresetPreprocessBase;

            _presets         = serializedObject.FindProperty("Presets");
            _exclude         = serializedObject.FindProperty("ExcludeProperties");
            _reorderableBase = new ReorderableCollection(_presets);

            _reorderableBase.CustomDrawerHeight += PresetDrawerHeight;
            _reorderableBase.CustomDrawer       += PresetDrawer;
            _reorderableBase.CustomAdd          += CustomAdd;
        }
コード例 #2
0
        private bool PreloadBase()
        {
            if (_preprocessBaseChecked)
            {
                return(_preprocessBase != null);
            }
            if (_preprocessBase == null)
            {
                _preprocessBase = MyScriptableObject.LoadAssetsFromResources <AssetsPresetPreprocessBase>().FirstOrDefault();
                if (_preprocessBase == null)
                {
                    _preprocessBase = MyScriptableObject.LoadAssets <AssetsPresetPreprocessBase>().SingleOrDefault();
                }

                _preprocessBaseChecked = true;
            }

            return(_preprocessBase != null);
        }