|
@@ -106,19 +106,19 @@ public class InstantiateQuadsEditor : EditorWindow
|
|
|
{
|
|
|
for (int j = 0; j < ver; j++)
|
|
|
{
|
|
|
- Texture texture = Resources.Load<Texture>("L10/L10_13x9" + i + "_" + j);
|
|
|
+ Texture texture = Resources.Load<Texture>("L9/L9_5x5" + i + "_" + j);
|
|
|
float startJ = 0 - (hor / 2.0f) + 0.5f;
|
|
|
float starti = 0 + (ver / 2.0f) - 0.5f;
|
|
|
// 实例化Prefab
|
|
|
GameObject quad = Instantiate(prefab, parent);
|
|
|
- quad.name = "L10" + i.ToString() + "_" + j.ToString();
|
|
|
+ quad.name = "L9" + i.ToString() + "_" + j.ToString();
|
|
|
|
|
|
// 设置位置
|
|
|
Vector3 localPosition = new Vector3(startJ + j, starti - i, 0);
|
|
|
quad.transform.localPosition = localPosition;
|
|
|
|
|
|
// 为每个实例化的对象创建新的材质,并保存为Asset
|
|
|
- Material mat = CreateAndSaveMaterial(texture, "Assets/Art/Material/Minimap/L10");
|
|
|
+ Material mat = CreateAndSaveMaterial(texture, "Assets/Art/Material/Minimap/L9");
|
|
|
quad.GetComponent<MeshRenderer>().material = mat;
|
|
|
}
|
|
|
}
|