示例#1
0
        public ResourceEditorController()
        {
            m_ConfigurationPath  = EditorType.GetConfigurationPath <ResourceEditorConfigPathAttribute>() ?? Utility.Path.GetRegularPath(Path.Combine(Application.dataPath, ConfigPath.ResourceXMLPath, ConfigPath.ResourceEditor));
            m_ResourceCollection = new ResourceCollection();
            m_ResourceCollection.OnLoadingResource += delegate(int index, int count)
            {
                if (OnLoadingResource != null)
                {
                    OnLoadingResource(index, count);
                }
            };

            m_ResourceCollection.OnLoadingAsset += delegate(int index, int count)
            {
                if (OnLoadingAsset != null)
                {
                    OnLoadingAsset(index, count);
                }
            };

            m_ResourceCollection.OnLoadCompleted += delegate()
            {
                if (OnLoadCompleted != null)
                {
                    OnLoadCompleted();
                }
            };

            m_SourceAssetSearchPaths         = new List <string>();
            m_SourceAssetSearchRelativePaths = new List <string>();
            m_SourceAssets                 = new Dictionary <string, SourceAsset>(StringComparer.Ordinal);
            m_SourceAssetRoot              = null;
            m_SourceAssetRootPath          = null;
            m_SourceAssetUnionTypeFilter   = null;
            m_SourceAssetUnionLabelFilter  = null;
            m_SourceAssetExceptTypeFilter  = null;
            m_SourceAssetExceptLabelFilter = null;
            m_AssetSorter = AssetSorterType.Path;

            SourceAssetRootPath = DefaultSourceAssetRootPath;
        }
示例#2
0
 public ResourceCollection()
 {
     m_ConfigurationPath = EditorType.GetConfigurationPath <ResourceCollectionConfigPathAttribute>() ?? Utility.Path.GetRegularPath(Path.Combine(Application.dataPath, ConfigPath.ResourceXMLPath, ConfigPath.ResourceCollection));
     m_Resources         = new SortedDictionary <string, Resource>(StringComparer.Ordinal);
     m_Assets            = new SortedDictionary <string, Asset>(StringComparer.Ordinal);
 }