예제 #1
0
        public void AddAssetDirectory <T>(AssetDirectory <T> directory) where T : ScriptObject
        {
            BeforeLoad(directory.Clear);

            m_catalogLoadActions.Add((onComplete) =>
            {
                var cats = ScriptObjectDirectory.Instance.GetAllCatalogs <T>();

                if (cats != null)
                {
                    foreach (var cat in cats)
                    {
                        directory.AddCatalog(cat);
                    }
                }

                onComplete();
            });
        }
예제 #2
0
        public void AddCatalogLoad <T>(string catalogName, AssetDirectory <T> directory, bool?useDevCatalog = null)
            where T : ScriptObject
        {
            if (string.IsNullOrEmpty(catalogName))
            {
                return;
            }

            BeforeLoad(directory.Clear);

            m_catalogLoadActions.Add((onComplete) =>
            {
                LoadCatalog <T>(SpaceName, catalogName, (cat) =>
                {
                    directory.AddCatalog(cat);

                    onComplete();
                }, useDevCatalog);
            });
        }