// an exception is thrown is two equivalent requirements are added. // The same asset dataset must not have paths with equivalent filenames. // The identifier allows to identify which data variant is actually loaded (use // the typeIdentifer property of the NSDataAsset that was created from the data set) public void AddVariant(DeviceRequirement requirement, string path, string typeIdentifier) { foreach (DataSetVariant item in m_Variants) { if (item.id != null && typeIdentifier != null && item.id == typeIdentifier) { throw new Exception("Two items within the same dataset must not have the same id"); } } AddVariant(new DataSetVariant(requirement, path, typeIdentifier)); }
public bool HasVariant(DeviceRequirement requirement) { foreach (var item in m_Variants) { if (item.requirement.values == requirement.values) { return(true); } } return(false); }
public void AddVariant(DeviceRequirement requirement, string path) { AddVariant(new ImageSetVariant(requirement, path)); }
public ImageSetVariant(DeviceRequirement requirement, string path) : base(requirement, path) { }
public DataSetVariant(DeviceRequirement requirement, string path, string id) : base(requirement, path) { this.id = id; }
public VariantData(DeviceRequirement requirement, string path) { this.requirement = requirement; this.path = path; }