Version: 2017.2

TextureImporter.GetPlatformTextureSettings

Cambiar al Manual
public bool GetPlatformTextureSettings (string platform, out int maxTextureSize, out TextureImporterFormat textureFormat, out int compressionQuality, out bool etc1AlphaSplitEnabled);

Parámetros

platform The platform for which settings are required (see options below).
maxTextureSize Anchura/altura máxima de textura en pixeles.
textureFormat Format of the texture for the given platform.
compressionQuality Un valor desde 0..100, equivalente a los ajustes de calidad JPEG estándar.
etc1AlphaSplitEnabled Status of the ETC1 and alpha split flag.

Valor de retorno

bool True if the platform override was found, false if no override was found.

Descripción

Obtiene unos ajustes de textura específicos de plataforma.

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", "Tizen", "PSP2", "PS4", "XboxOne", "Samsung TV", "Nintendo 3DS", "WiiU" and "tvOS".

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); } } }

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

Parámetros

platform La plataforma cuyos ajustes se requieren (mirar abajo).
maxTextureSize Anchura/altura máxima de textura en pixeles.
textureFormat Formato de la textura.
compressionQuality Un valor desde 0..100, equivalente a los ajustes de calidad JPEG estándar.

Valor de retorno

bool True if the platform override was found, false if no override was found.

Descripción

Obtiene unos ajustes de textura específicos de plataforma.

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", "Tizen", "PSP2", "PS4", "XboxOne", "Samsung TV", "Nintendo 3DS", "WiiU" and "tvOS".


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

Parámetros

platform La plataforma cuyos ajustes se requieren (mirar abajo).
maxTextureSize Anchura/altura máxima de textura en pixeles.
textureFormat Formato de la textura.

Valor de retorno

bool True if the platform override was found, false if no override was found.

Descripción

Obtiene unos ajustes de textura específicos de plataforma.

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", "Tizen", "PSP2", "PS4", "XboxOne", "Samsung TV", "Nintendo 3DS", "WiiU" and "tvOS".


public TextureImporterPlatformSettings GetPlatformTextureSettings (string platform);

Parámetros

platform La plataforma cuyos ajustes se requieren (mirar abajo).

Valor de retorno

TextureImporterPlatformSettings A TextureImporterPlatformSettings structure containing the platform parameters.

Descripción

Obtiene unos ajustes de textura específicos de plataforma.

Returns the parameters for the chosen platform. The options for the platform string are "Standalone", "Web", "iPhone", "Android", "WebGL", "Windows Store Apps", "Tizen", "PSP2", "PS4", "XboxOne", "Samsung TV", "Nintendo 3DS", "WiiU" and "tvOS".