我正在尝试制作一个编辑器脚本来设置我的图像的导入设置。我不想做这本手册,因为我需要导入数百张图像。
所以我想设置编辑默认导入设置。
我尝试了以下方法:
using System.Collections;
using System.Collections.Generic;
using UnityEditor;
[InitializeOnLoad]
public class EditorSettings : Editor {
private static TextureImporter CustomImporter;
static EditorSettings()
{
CustomImporter.npotScale.None; // see below for error.
}
}
我得到的错误如下:
无法使用实例引用访问成员“TextureImporterNPOTScale.None”;改为使用类型名称来限定它
我该怎么做呢?(这与统一如何让我访问属性有关。)
这甚至是更改图像导入设置的正确方法吗?
让我知道是否有任何不清楚的地方,以便我澄清。