using AssetRipper.Assets.Collections; namespace AssetRipper.Assets.Bundles; /// /// A containing s. /// public sealed class ProcessedBundle : VirtualBundle { /// public override string Name { get; } /// /// Initializes a new instance of the class with a generated name. /// public ProcessedBundle() { Name = GenerateRandomName(); } /// /// Initializes a new instance of the class. /// /// The name of the bundle. If a name is not provided, a random name is generated. public ProcessedBundle(string? name) { Name = string.IsNullOrEmpty(name) ? GenerateRandomName() : name; } private static string GenerateRandomName() => $"{nameof(ProcessedBundle)}_{UnityGuid.NewGuid()}"; /// /// Adds a new processed asset collection to this bundle. /// /// The name of the new asset collection. /// The Unity version of the new asset collection. public ProcessedAssetCollection AddNewProcessedCollection(string name, UnityVersion version) { ProcessedAssetCollection processedCollection = new ProcessedAssetCollection(this); processedCollection.Name = name; processedCollection.SetLayout(version); return processedCollection; } }