TextureImporter.GetPlatformTextureSettings

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

Parámetros

platformThe platform for which settings are required (see options below).
maxTextureSizeAnchura/altura máxima de textura en pixeles.
textureFormatFormat of the texture for the given platform.
compressionQualityUn valor desde 0..100, equivalente a los ajustes de calidad JPEG estándar.
etc1AlphaSplitEnabledStatus 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", "PSP2", "PS4", "XboxOne", "Nintendo 3DS" 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

platformLa plataforma cuyos ajustes se requieren (mirar abajo).
maxTextureSizeAnchura/altura máxima de textura en pixeles.
textureFormatFormato de la textura.
compressionQualityUn 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", "PSP2", "PS4", "XboxOne", "Nintendo 3DS" and "tvOS".


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

Parámetros

platformLa plataforma cuyos ajustes se requieren (mirar abajo).
maxTextureSizeAnchura/altura máxima de textura en pixeles.
textureFormatFormato 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", "PSP2", "PS4", "XboxOne", "Nintendo 3DS" and "tvOS".


public TextureImporterPlatformSettings GetPlatformTextureSettings (string platform);

Parámetros

platformLa 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", "PSP2", "PS4", "XboxOne", "Nintendo 3DS" and "tvOS".