protected virtual void Initialize() { Regex regex = new Regex("^assets/", RegexOptions.IgnoreCase); foreach (string bundleName in AssetDatabaseHelper.GetUsedAssetBundleNames()) { var assets = AssetDatabase.GetAssetPathsFromAssetBundle(bundleName); for (int i = 0; i < assets.Length; i++) { var assetPath = assets[i].ToLower(); var key = regex.Replace(assetPath, ""); dict[key] = Path.GetFilePathWithoutExtension(bundleName).ToLower(); } } }
public SimulationBundleManager() { this.bundles = new Dictionary <string, IBundle>(); this.bundleNames = AssetDatabaseHelper.GetUsedAssetBundleNames(); }