public TextureImporterFormat GetAutomaticFormat(string platform)
{
TextureImporterSettings dest = new TextureImporterSettings();
this.ReadTextureSettings(dest);
TextureImporterPlatformSettings platformTextureSettings = this.GetPlatformTextureSettings(platform);
List<BuildPlayerWindow.BuildPlatform> validPlatforms = BuildPlayerWindow.GetValidPlatforms();
foreach (BuildPlayerWindow.BuildPlatform platform2 in validPlatforms)
{
if (platform2.name == platform)
{
return FormatFromTextureParameters(dest, platformTextureSettings, this.DoesSourceTextureHaveAlpha(), this.IsSourceTextureHDR(), platform2.DefaultTarget);
}
}
return TextureImporterFormat.Automatic;
}