コード例 #1
0
 // 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));
 }
コード例 #2
0
 public bool HasVariant(DeviceRequirement requirement)
 {
     foreach (var item in m_Variants)
     {
         if (item.requirement.values == requirement.values)
         {
             return(true);
         }
     }
     return(false);
 }
コード例 #3
0
 public void AddVariant(DeviceRequirement requirement, string path)
 {
     AddVariant(new ImageSetVariant(requirement, path));
 }
コード例 #4
0
 public ImageSetVariant(DeviceRequirement requirement, string path) : base(requirement, path)
 {
 }
コード例 #5
0
 public DataSetVariant(DeviceRequirement requirement, string path, string id) : base(requirement, path)
 {
     this.id = id;
 }
コード例 #6
0
 public VariantData(DeviceRequirement requirement, string path)
 {
     this.requirement = requirement;
     this.path        = path;
 }