# GetPlatformTextureSettings

> Gets platform specific texture settings.

## Definition

* **Type:** Method
* **Namespace:** [UnityEditor](/engine/6000.3/script-reference/unityeditor.md)
* **Assembly:** UnityEditor

## GetPlatformTextureSettings(string, int, TextureImporterFormat, int, bool)

Gets platform specific texture settings.

```csharp
public bool GetPlatformTextureSettings(string platform, out int maxTextureSize, out TextureImporterFormat textureFormat, out int compressionQuality, out bool etc1AlphaSplitEnabled)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The platform for which settings are required (see options below).**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Maximum texture width/height in pixels.**** (\[TextureImporterFormat]\(/engine/6000.3/script-reference/unityeditor/textureimporterformat)): Format of the texture for the given platform.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Value from 0..100, equivalent to the standard JPEG quality setting.**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): Status of the ETC1 and alpha split flag.

### Returns

| Type                                                          | Description                                                              |
| ------------------------------------------------------------- | ------------------------------------------------------------------------ |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | True if the platform override was found, false if no override was found. |

### Remarks

The values for the chosen platform are returned in the "out" parameters. The options for the platform string are "Standalone", "Web", "iPhone", "Android", "WebGL", "Windows Store Apps", "PS4", "XboxOne", "Nintendo Switch" and "tvOS".

### Examples

```csharp
using UnityEngine;
using UnityEditor;
using UnityEngine.UI;
using System.Collections;

public class DisplayInfo : EditorWindow
{
    [MenuItem("PlatformSettings/GetSettingsForAndroid")]
    static void GetAndroidSettings()
    {
        string  platformString = "Android";
        int     platformMaxTextureSize = 0;
        TextureImporterFormat platformTextureFmt;
        int     platformCompressionQuality = 0;
        bool    platformAllowsAlphaSplit = false;

        TextureImporter ti = (TextureImporter)TextureImporter.GetAtPath("Assets/characters.png");
        if (ti.GetPlatformTextureSettings(platformString, out platformMaxTextureSize, out platformTextureFmt, out platformCompressionQuality, out platformAllowsAlphaSplit))
        {
            Debug.Log("Found some overrides for platform: " + platformString);
        }
    }
}
```

## GetPlatformTextureSettings(string, int, TextureImporterFormat, int)

Gets platform specific texture settings.

```csharp
public bool GetPlatformTextureSettings(string platform, out int maxTextureSize, out TextureImporterFormat textureFormat, out int compressionQuality)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The platform whose settings are required (see below).**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Maximum texture width/height in pixels.**** (\[TextureImporterFormat]\(/engine/6000.3/script-reference/unityeditor/textureimporterformat)): Format of the texture.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Value from 0..100, equivalent to the standard JPEG quality setting.

### Returns

| Type                                                          | Description                                                              |
| ------------------------------------------------------------- | ------------------------------------------------------------------------ |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | True if the platform override was found, false if no override was found. |

### Remarks

The values for the chosen platform are returned in the "out" parameters. The options for the platform string are "Standalone", "Web", "iPhone", "Android", "WebGL", "Windows Store Apps", "PS4", "XboxOne", "Nintendo Switch" and "tvOS".

## GetPlatformTextureSettings(string, int, TextureImporterFormat)

Gets platform specific texture settings.

```csharp
public bool GetPlatformTextureSettings(string platform, out int maxTextureSize, out TextureImporterFormat textureFormat)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The platform whose settings are required (see below).**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Maximum texture width/height in pixels.**** (\[TextureImporterFormat]\(/engine/6000.3/script-reference/unityeditor/textureimporterformat)): Format of the texture.

### Returns

| Type                                                          | Description                                                              |
| ------------------------------------------------------------- | ------------------------------------------------------------------------ |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | True if the platform override was found, false if no override was found. |

### Remarks

The values for the chosen platform are returned in the "out" parameters. The options for the platform string are "Standalone", "Web", "iPhone", "Android", "WebGL", "Windows Store Apps", "PS4", "XboxOne", "Nintendo Switch" and "tvOS".

## GetPlatformTextureSettings(string)

Gets platform specific texture settings.

```csharp
public TextureImporterPlatformSettings GetPlatformTextureSettings(string platform)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The platform whose settings are required (see below).

### Returns

| Type                                                                                                              | Description                                                                                                                                                       |
| ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [TextureImporterPlatformSettings](/engine/6000.3/script-reference/unityeditor/textureimporterplatformsettings.md) | A [TextureImporterPlatformSettings](/engine/6000.3/script-reference/unityeditor/textureimporterplatformsettings.md) structure containing the platform parameters. |

### Remarks

Returns the parameters for the chosen platform. The options for the platform string are "Standalone", "Web", "iPhone", "Android", "WebGL", "Windows Store Apps", "PS4", "XboxOne", "Nintendo Switch" and "tvOS".
