Ejemplo n.º 1
0
        private static void OnPostprocessAllAssets(string[] importedAssets, string[] deletedAssets, string[] movedAssets, string[] movedFromAssetPaths)
        {
            if (!AssetDBSetting.GetInstance().GetHandleAssetPostprocessor())
            {
                return;
            }

            DB.GetInstance().OnPostprocessAllAssets(importedAssets
                                                    , deletedAssets
                                                    , movedAssets
                                                    , movedFromAssetPaths);
        }
Ejemplo n.º 2
0
        public override void OnGUI(string searchContext)
        {
            base.OnGUI(searchContext);
            AssetDBSetting setting = AssetDBSetting.GetInstance();

            EditorGUILayout.BeginHorizontal();
            setting.SetHandleAssetPostprocessor(EditorGUILayout.Toggle("自动计算资源引用关系", setting.GetHandleAssetPostprocessor()));
            if (setting.GetHandleAssetPostprocessor() &&
                GUILayout.Button("重新计算所有资源的引用关系"))
            {
                DB.GetInstance().RecaculateDBWithDialog();
            }
            EditorGUILayout.EndHorizontal();
            if (setting.GetHandleAssetPostprocessor())
            {
                EditorGUILayout.HelpBox("开启\"自动计算资源引用关系\"功能后,最好执行一次\"重新计算所有资源的引用关系\"", MessageType.Info);
            }
        }