Beispiel #1
0
        //----- property -----

        //----- method -----

        void OnEnable()
        {
            instance = target as DeleteAssetSetting;

            changed = false;

            var guids = instance.Guids.ToArray();

            assetListView = new AssetRegisterScrollView("Delete Targets", "DeleteAssetSettingInspector-Delete Targets");
            assetListView.RemoveChildrenAssets = true;
            assetListView.SetContents(guids);

            assetListView.OnUpdateContentsAsObservable().Subscribe(x => OnUpdateContents(x));
        }
Beispiel #2
0
        public override void OnInspectorGUI()
        {
            instance = target as DeleteAssetSetting;

            EditorLayoutTools.ContentTitle("Label");

            using (new ContentsScope())
            {
                EditorGUI.BeginChangeCheck();

                var tag = EditorGUILayout.DelayedTextField(instance.Tag);

                if (EditorGUI.EndChangeCheck())
                {
                    UnityEditorUtility.RegisterUndo("DeleteAssetSettingInspector Undo", instance);

                    Reflection.SetPrivateField(instance, "tag", tag);

                    UnityEditorUtility.SaveAsset(instance);
                }
            }

            assetListView.DrawGUI();
        }