// 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);
 }
Exemple #3
0
 public void AddVariant(DeviceRequirement requirement, string path)
 {
     AddVariant(new ImageSetVariant(requirement, path));
 }
Exemple #4
0
 public ImageSetVariant(DeviceRequirement requirement, string path) : base(requirement, path)
 {
 }
Exemple #5
0
 public DataSetVariant(DeviceRequirement requirement, string path, string id) : base(requirement, path)
 {
     this.id = id;
 }
Exemple #6
0
 public VariantData(DeviceRequirement requirement, string path)
 {
     this.requirement = requirement;
     this.path        = path;
 }