ScriptReference/TextureImporter.SetPlatformTextureSettings #606
Replies: 1 comment
-
|
To set specific platform you must first GetPlatformTextureSettingsmake changes then set it back with SetPlatformTextureSettings: var textureImporter = (TextureImporter) AssetImporter.GetAtPath("Assets/SomePathToTextureFile");
var settingsDefault = new TextureImporterPlatformSettings
{
textureCompression = TextureImporterCompression.Uncompressed,
format = TextureImporterFormat.Automatic
};
textureImporter.SetPlatformTextureSettings(settingsDefault);
var androidOverrides = textureImporter.GetPlatformTextureSettings("Android");
androidOverrides.overridden = true;
androidOverrides.format = TextureImporterFormat.ETC2_RGB4;
textureImporter.SetPlatformTextureSettings(androidOverrides); |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
ScriptReference/TextureImporter.SetPlatformTextureSettings
https://docs.unity3d.com/ScriptReference/TextureImporter.SetPlatformTextureSettings.html
Beta Was this translation helpful? Give feedback.
All reactions