91超碰碰碰碰久久久久久综合_超碰av人澡人澡人澡人澡人掠_国产黄大片在线观看画质优化_txt小说免费全本

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

unity3d紋理格式設置

發布時間:2020-08-09 07:57:25 來源:網絡 閱讀:5530 作者:螞蟻雄心 欄目:游戲開發

Texure Type設置為Advanced時紋理的格式列表

格式

詳解

Automatic Compressed

壓縮RGB紋理,默認選項,常用的漫反射紋理格式。4/像素(32KB, 256x256)

RGB Compressed DXT1

壓縮的RGB紋理。常用的漫反射紋理格式。4/像素(32KB, 256x256)

RGBA Compressed DXT5

壓縮的RGBA紋理。是漫反射和高光控制紋理的主要格式。1字節/像素(64KB, 256x256)

RGB Compressed ETC 4bits

壓縮的RGB紋理,是Android工程默認的紋理格式,不支持alpha通道。(32KB, 256x256)

RGB Compressed PVRTC 2bits

壓縮的RGB紋理,支持Imagination PowerVR GPU2/像素 (16KB, 256x256)

RGBA Compressed PVRTC 2bits

壓縮的RGBA紋理,支持Imagination PowerVR GPU2/像素 (16KB, 256x256)

RGB Compressed PVRTC 4bits

壓縮的RGB紋理,支持Imagination PowerVR GPU4/像素 (32KB, 256x256)

RGBA Compressed PVRTC 4bits

壓縮的RGBA紋理,支持Imagination PowerVR GPU

4/像素 (32KB, 256x256)

RGB Compressed ATC 4bits

壓縮的RGB紋理,支持Qualcomm Snapdragon,4/像素 (32KB, 256x256)

RGBA Compressed ATC 8bits

壓縮的RGB紋理,支持Qualcomm Snapdragon,8/像素 (64KB, 256x256)

Automatic 16bits

RGB彩色,16位彩***最多可以有216次方種顏色(低質量真彩色)

RGB 16bits

65萬色不帶alpha,比壓縮的格式使用更多的內存,適用UI紋理(128KB,256x256)

ARGB 16bits

低質量真彩色,具有16級的紅綠藍和alpha通道(128KB, 256x256)

RGBA 16bits

Automatic Turecolor

最高質量的真彩色,也就是32位的色彩(256x256的紋理大小為256KB)

RGB 24bits

真彩色不帶alpha通道(192KB, 256x256)

Alpha 8bits

高質量alpha通道,不帶顏色(64KB, 256x256)

ARGB 32bits

真彩色帶alpha通道(256KB, 256x256)

RGBA 32bits

在Unity3D中自定義設置紋理格式

       把ChangeTextureImportSettings.cs放于Assets/Editor目錄下,ChangeTextureImportSettings.cs內容如下:

using UnityEngine;


using UnityEditor;




// /////////////////////////////////////////////////////////////////////////////////////////////////////////

//

// Batch Texture import settings modifier.

//

// Modifies all selected textures in the project window and applies the requested modification on the


// textures. Idea was to have the same choices for multiple files as you would have if you open the


// import settings of a single texture. Put this into Assets/Editor and once compiled by Unity you find


// the new functionality in Custom -> Texture. Enjoy! :-)


//


// Based on the great work of benblo in this thread:

// http://forum.unity3d.com/viewtopic.php?t=16079&start=0&postdays=0&postorder=asc&highlight=textureimporter

//

// Developed by Martin Schultz, Decane in August 2009

// e-mail: ms@decane.net

//

// Updated for Unity 3.0 by col000r in August 2010

// http://col000r.blogspot.com

//

// /////////////////////////////////////////////////////////////////////////////////////////////////////////


public class ChangeTextureImportSettingsUnity3 : ScriptableObject {

[MenuItem ("Custom/Texture/Change Texture Format/Auto Compressed")]

static void ChangeTextureFormat_AutoCompressed() {

SelectedChangeTextureFormatSettings(TextureImporterFormat.AutomaticCompressed);

}

[MenuItem ("Custom/Texture/Change Texture Format/Auto 16bit")]

static void ChangeTextureFormat_Auto16Bit() {

SelectedChangeTextureFormatSettings(TextureImporterFormat.Automatic16bit);

}

[MenuItem ("Custom/Texture/Change Texture Format/Auto Truecolor")]

static void ChangeTextureFormat_AutoTruecolor() {

SelectedChangeTextureFormatSettings(TextureImporterFormat.AutomaticTruecolor);

}

[MenuItem ("Custom/Texture/Change Texture Format/RGB Compressed DXT1")]

static void ChangeTextureFormat_RGB_DXT1() {

SelectedChangeTextureFormatSettings(TextureImporterFormat.DXT1);

}

[MenuItem ("Custom/Texture/Change Texture Format/RGB Compressed DXT5")]

static void ChangeTextureFormat_RGB_DXT5() {

SelectedChangeTextureFormatSettings(TextureImporterFormat.DXT5);

}

[MenuItem ("Custom/Texture/Change Texture Format/RGB 16 bit")]

static void ChangeTextureFormat_RGB_16bit() {

SelectedChangeTextureFormatSettings(TextureImporterFormat.RGB16);

}

[MenuItem ("Custom/Texture/Change Texture Format/RGB 24 bit")]

static void ChangeTextureFormat_RGB_24bit() {

SelectedChangeTextureFormatSettings(TextureImporterFormat.RGB24);

}

[MenuItem ("Custom/Texture/Change Texture Format/Alpha 8 bit")]

static void ChangeTextureFormat_Alpha_8bit() {

SelectedChangeTextureFormatSettings(TextureImporterFormat.Alpha8);

}

[MenuItem ("Custom/Texture/Change Texture Format/ARGB 16 bit")]

static void ChangeTextureFormat_RGBA_16bit() {

SelectedChangeTextureFormatSettings(TextureImporterFormat.ARGB16);

}

[MenuItem ("Custom/Texture/Change Texture Format/RGBA 32 bit")]

static void ChangeTextureFormat_RGBA_32bit() {

SelectedChangeTextureFormatSettings(TextureImporterFormat.RGBA32);

}

[MenuItem ("Custom/Texture/Change Texture Format/ARGB 32 bit")]

static void ChangeTextureFormat_ARGB_32bit() {

SelectedChangeTextureFormatSettings(TextureImporterFormat.ARGB32);

}

[MenuItem ("Custom/Texture/Change Texture Format/RGB PVRTC 2bit")]

static void ChangeTextureFormat_RGB_PVRTC_2bit() {

SelectedChangeTextureFormatSettings(TextureImporterFormat.PVRTC_RGB2);

}

[MenuItem ("Custom/Texture/Change Texture Format/RGBA PVRTC 2bit")]

static void ChangeTextureFormat_RGBA_PVRTC_2bit() {

SelectedChangeTextureFormatSettings(TextureImporterFormat.PVRTC_RGBA2);

}    

[MenuItem ("Custom/Texture/Change Texture Format/RGB PVRTC 4bit")]

static void ChangeTextureFormat_RGB_PVRTC_4bit() {

SelectedChangeTextureFormatSettings(TextureImporterFormat.PVRTC_RGB4);

}

[MenuItem ("Custom/Texture/Change Texture Format/RGBA PVRTC 4bit")]

static void ChangeTextureFormat_RGBA_PVRTC_4bit() {

SelectedChangeTextureFormatSettings(TextureImporterFormat.PVRTC_RGBA4);

}

// ----------------------------------------------------------------------------

[MenuItem ("Custom/Texture/Change Texture Size/Change Max Texture Size/32")]

static void ChangeTextureSize_32() {

SelectedChangeMaxTextureSize(32);

}

[MenuItem ("Custom/Texture/Change Texture Size/Change Max Texture Size/64")]

static void ChangeTextureSize_64() {

SelectedChangeMaxTextureSize(64);

}

[MenuItem ("Custom/Texture/Change Texture Size/Change Max Texture Size/128")]

static void ChangeTextureSize_128() {

SelectedChangeMaxTextureSize(128);

}

[MenuItem ("Custom/Texture/Change Texture Size/Change Max Texture Size/256")]

static void ChangeTextureSize_256() {

SelectedChangeMaxTextureSize(256);

}

[MenuItem ("Custom/Texture/Change Texture Size/Change Max Texture Size/512")]

static void ChangeTextureSize_512() {

SelectedChangeMaxTextureSize(512);

}

[MenuItem ("Custom/Texture/Change Texture Size/Change Max Texture Size/1024")]

static void ChangeTextureSize_1024() {

SelectedChangeMaxTextureSize(1024);

}

[MenuItem ("Custom/Texture/Change Texture Size/Change Max Texture Size/2048")]

static void ChangeTextureSize_2048() {

SelectedChangeMaxTextureSize(2048);

}

// ----------------------------------------------------------------------------

[MenuItem ("Custom/Texture/Change MipMap/Enable MipMap")]

static void ChangeMipMap_On() {

SelectedChangeMimMap(true);

}

[MenuItem ("Custom/Texture/Change MipMap/Disable MipMap")]

static void ChangeMipMap_Off() {

SelectedChangeMimMap(false);

}

// ----------------------------------------------------------------------------

[MenuItem ("Custom/Texture/Change Non Power of 2/None")]

static void ChangeNPOT_None() {

SelectedChangeNonPowerOf2(TextureImporterNPOTScale.None);

}

[MenuItem ("Custom/Texture/Change Non Power of 2/ToNearest")]

static void ChangeNPOT_ToNearest() {

SelectedChangeNonPowerOf2(TextureImporterNPOTScale.ToNearest);

}

[MenuItem ("Custom/Texture/Change Non Power of 2/ToLarger")]

static void ChangeNPOT_ToLarger() {

SelectedChangeNonPowerOf2(TextureImporterNPOTScale.ToLarger);

}

[MenuItem ("Custom/Texture/Change Non Power of 2/ToSmaller")]

static void ChangeNPOT_ToSmaller() {

SelectedChangeNonPowerOf2(TextureImporterNPOTScale.ToSmaller);

}    

// ----------------------------------------------------------------------------

[MenuItem ("Custom/Texture/Change Is Readable/Enable")]

static void ChangeIsReadable_Yes() {

SelectedChangeIsReadable(true);

}

[MenuItem ("Custom/Texture/Change Is Readable/Disable")]

static void ChangeIsReadable_No() {

SelectedChangeIsReadable(false);

}    //Unity3D教程手冊:www.unitymanual.com

// ----------------------------------------------------------------------------

static void SelectedChangeIsReadable(bool enabled) {

Object[] textures = GetSelectedTextures();

Selection.objects = new Object[0];

foreach (Texture2D texture in textures)  {

string path = AssetDatabase.GetAssetPath(texture);

TextureImporter textureImporter = AssetImporter.GetAtPath(path) as TextureImporter;

textureImporter.isReadable = enabled;    

AssetDatabase.ImportAsset(path);

}

}

static void SelectedChangeNonPowerOf2(TextureImporterNPOTScale npot) {

Object[] textures = GetSelectedTextures();

Selection.objects = new Object[0];

foreach (Texture2D texture in textures)  {

string path = AssetDatabase.GetAssetPath(texture);

TextureImporter textureImporter = AssetImporter.GetAtPath(path) as TextureImporter;

textureImporter.npotScale = npot;    

AssetDatabase.ImportAsset(path);

}

}

static void SelectedChangeMimMap(bool enabled) {

Object[] textures = GetSelectedTextures();

Selection.objects = new Object[0];

foreach (Texture2D texture in textures)  {

string path = AssetDatabase.GetAssetPath(texture);

TextureImporter textureImporter = AssetImporter.GetAtPath(path) as TextureImporter;

textureImporter.mipmapEnabled = enabled;    

AssetDatabase.ImportAsset(path);

}

}

//Unity3D教程手冊:www.unitymanual.com

static void SelectedChangeMaxTextureSize(int size) {

Object[] textures = GetSelectedTextures();

Selection.objects = new Object[0];

foreach (Texture2D texture in textures)  {

string path = AssetDatabase.GetAssetPath(texture);

TextureImporter textureImporter = AssetImporter.GetAtPath(path) as TextureImporter;

textureImporter.maxTextureSize = size;  

AssetDatabase.ImportAsset(path);

}

}

static void SelectedChangeTextureFormatSettings(TextureImporterFormat newFormat) {

Object[] textures = GetSelectedTextures();

Selection.objects = new Object[0];

foreach (Texture2D texture in textures)  {

string path = AssetDatabase.GetAssetPath(texture);

//Debug.Log("path: " + path);

TextureImporter textureImporter = AssetImporter.GetAtPath(path) as TextureImporter;

textureImporter.textureFormat = newFormat;  

AssetDatabase.ImportAsset(path);

}

}

static Object[] GetSelectedTextures()

{

return Selection.GetFiltered(typeof(Texture2D), SelectionMode.DeepAssets);

}

}


向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

弥勒县| 双柏县| 华蓥市| 西乌珠穆沁旗| 济南市| 杭州市| 柘城县| 剑阁县| 台州市| 策勒县| 林州市| 伊吾县| 蒙城县| 凯里市| 漯河市| 长葛市| 隆回县| 江永县| 合山市| 施秉县| 佛坪县| 板桥市| 柳林县| 唐海县| 兴海县| 尖扎县| 博乐市| 英山县| 台州市| 瑞昌市| 枝江市| 龙口市| 修武县| 会昌县| 米泉市| 柘荣县| 平山县| 潜江市| 鹤庆县| 滕州市| 老河口市|