Пример #1
0
   public void ApplyTextureImportSettings(SimpleTextureImportSettings textureSettings)
   {
 #if UNITY_EDITOR
       TextureImporter importer = AssetImporter.GetAtPath(this.path) as TextureImporter;
       importer.alphaIsTransparency = textureSettings.alphaIsTransparency;
       importer.maxTextureSize      = textureSettings.maxTextureSize;
       importer.mipmapEnabled       = textureSettings.mipmapEnabled;
       importer.wrapMode            = textureSettings.wrapMode;
       importer.textureCompression  = textureSettings.compression;
       importer.compressionQuality  = (int)textureSettings.compressionQuality;
       importer.SaveAndReimport();
 #endif
   }
Пример #2
0
 public ImageSpriteAssignment(StandaloneSprite changeable, ImageResource resource, SimpleTextureImportSettings textureSettings) : base(changeable)
 {
     this.resource        = resource;
     this.textureSettings = textureSettings;
 }