Пример #1
0
        /// <summary>
        /// 获取指定资源依赖的资源列表
        /// 注意:返回列表里已经包括主资源自己
        /// </summary>
        private List <AssetInfo> GetDependencies(string mainAssetPath)
        {
            List <AssetInfo> result = new List <AssetInfo>();

            string[] depends = AssetDatabase.GetDependencies(mainAssetPath, true);
            foreach (string assetPath in depends)
            {
                if (AssetBundleCollectorSettingData.IsValidateAsset(assetPath))
                {
                    AssetInfo assetInfo = new AssetInfo(assetPath);
                    result.Add(assetInfo);
                }
            }
            return(result);
        }