查詢所有有多個 Texture 的 Matrial

2022-08-28 17:39:10 字數 1320 閱讀 3825

using unityengine;

using unityeditor;

using system.collections;

using system.collections.generic;

public class findmultexturematerial : editorwindow

// 當前介面狀態

private winstate m_curwinstate = winstate.initstate;

// 用來儲存找到的引用material

private listm_materialpathlist = new list();

// 用來儲存所有找到的資源路徑的資料

private string m_allassetlist;

// 滾動引數

private vector2 scrollpos = vector2.zero;

// 搜尋路徑

private string m_searchpath = "assets/art/characters";

// 單例

public static findmultexturematerial m_win;

[menuitem("assets/查詢所有有多個 texture 的 matrial ")]

public static void checkmulmat()

}void ongui()

if (guilayout.button("重新整理", guilayout.height(40)))

}private void oninitstate()

}// 1.1 顯示紋理依賴

private void findtexturedepend()

);for (int i = 0; i < m_allassetlist.length; ++i)

); // 紋理依賴項

debug.log(materialpath + " " + materialdependlist.length.tostring());

for (int k = 0; k < materialdependlist.length; ++k)

}if (i >= m_allassetlist.length - 1)}}

// 顯示依賴的material介面布局

private void showtexturedepend()

editorguilayout.space();

editorguilayout.endscrollview();

editorguilayout.endvertical();}}

第四課 多個Texture的繪製

上一課我們講解了關於如何用sdl顯示乙個bmp的,其實就是涉及sdl window,sdl su ce,sdl renderer,sdl texture,如果在sdl上面顯示幾個呢,也很簡單,也就是用多個sdl texture繪製在乙個sdl renderer上,在指定位置以及大小就可以了,下面看一...

查詢所有表的所有字段資訊

select table name from user tables 查詢所有表的所有字段資訊 select a.table name as 表名,a.column name as 列名 a.data type as 資料型別,a.data length as 長度,a.nullable as 是否...

查詢資料庫中所有有自增列的使用者表

查詢資料庫中所有有自增列的使用者表 很多時候我們需要查詢資料庫中的所有的有自增列的資料庫表,資料庫表多的時候,自己去查太麻煩了,所以我寫了段指令碼幫我們查詢並列印出資料庫表名,如下所示 查詢資料庫中所有有自增id的表 declare curtablename cursor local for sel...