- 14
- 0
- 约6.81千字
- 约 8页
- 2020-06-11 发布于山东
- 举报
批量更改图片属性 编辑器插件 TextureImportSetting
Posted on 2013年05月31日 by U3d / \o 查看 Unity3D脚本/插件 中的全部文章 Unity3D脚本/插件/被围观 104 次
使用说明: 在Assets文件夹下创建Editor文件夹,将复制或拷贝该代码保存成TextureImportSetting.cs放入Editor文件夹,将该脚本放入该文件夹选择需要批量设置的贴图,单击Costom/Texture Import Settings,打开窗口后选择对应参数,点击Set Texture ImportSettings,稍等片刻,批量设置成功。
001
using UnityEngine;
002
003
using System.Collections;
004
005
using UnityEditor;
006
007
///
008
009
///
010
011
///
012
013
///
014
015
///
016
017
///
018
019
///
020
021
///
022
023
public class TextureImportSetting : EditorWindow
024
025
{
026
027
///
028
029
/// 临时存储int[]
030
031
///
032
033
private int[] IntArray = new int[] { 0, 1, 2, 3, 4, 5, 6, 7 };
034
035
//AnisoLevel
036
037
private int AnisoLevel = 1;
038
039
//Filter Mode
040
041
private int FilterModeInt = 0;
042
043
private string[] FilterModeString = new string[] { “Point”, “Bilinear”, “Trilinear” };
044
045
//Wrap Mode
046
047
private int WrapModeInt = 0;
048
049
private string[] WrapModeString = new string[] { “Repeat”, “Clamp” };
050
051
//Texture Type
052
053
private int TextureTypeInt = 0;
054
055
private string[] TextureTypeString = new string[] { “Texture”, “Normal Map”, “GUI”, “Refelection”, “Cookie”, “Lightmap”, “Advanced” };
056
057
//Max Size
058
059
private int MaxSizeInt = 5;
060
061
private string[] MaxSizeString = new string[] { “32”, “64”, “128”, “256”, “512”, “1024”, “2048”, “4096” };
062
063
//Format
064
065
private int FormatInt = 0;
066
067
private string[] FormatString = new string[] { “Compressed”, “16 bits”, “true color” };
068
069
///
070
071
/// 创建、显示窗体
072
073
///
074
075
[@MenuItem(“Custom/Texture Import Settings”)]
076
077
private static void Init()
078
079
{
080
081
TextureImportSetting window = (TextureImportSetting)GetWindow(typeof(TextureImportSetting), true, “TextureImportSetting”);
082
083
window.Show();
084
085
}
086
087
///
088
089
/// 显示窗体里面的内容
090
091
///
092
093
privat
您可能关注的文档
- 吊脚楼建筑结构设计说明书 (2).docx
- 大塘湾一级(60kmh)公路设计计算书.doc
- 寇慧俊 山西省晋中市榆次区乌金山镇聂店小学 《打秋千》教学设计(1).doc
- 对学习成果的评价 漂亮的图形.doc
- 导航音响调试指南.docx
- 将3D坐标转成2D坐标的方法.docx
- 将桩基图转换至设计控制点坐标位置.doc
- 小型果蔬冷藏库用太阳能喷射制冷系统设计(1).doc
- 小学三年级下册语文期末综合检测试题(1).docx
- 小学二年级(下)语文期末教学质量检测(2份).doc
- (正式版)DB51∕T 1867-2014 《袋栽黑木耳生产技术规程》.docx
- (正式版)DB51∕T 2413-2023 《油橄榄密植丰产栽培技术规程》.docx
- (正式版)DB51∕T 2436-2017 《川菜东坡一品肉烹饪工艺技术规范》.docx
- (正式版)DB51∕T 2396-2017 《农村电子商务服务站(点)服务与管理规范》.docx
- (正式版)DB51∕T 2419-2017 《桢楠扦插育苗技术规程》.docx
- CN105145773B 一种无花果曲奇饼干及其制作方法 (江苏农林职业技术学院).docx
- CN105203825A 微测量电极的制作方法和热电势的测量方法及相关装置 (国家纳米科学中心).docx
- CN105137533B 一种啁啾光纤光栅及其制作方法 (南京航空航天大学).docx
- (正式版)DB51∕T 2453-2018 《巴山新居公共管理指南》.docx
- (正式版)DB51∕T 1892-2014 《川西北地区沙化土地治理技术规程》.docx
原创力文档

文档评论(0)