Unity3D批量修改Texture属性
功能
批量读取选择的文件夹下的Texture类型文件,按照需求更改Texture的属性。
思路
读取所选择文件夹下的某类型文件,包括所有子文件夹,有一个很强大的函数。
public static Object[] GetFiltered(Type type, SelectionMode mode);
其中SelectionMode可选择如下:
Variables | Description |
---|---|
Unfiltered | Return the whole selection. |
TopLevel | Only return the topmost selected transform. A selected child of another selected transform will be filtered out. |
Deep | Return the selection and all child transforms of the selection. |