ローカルから画像を読み込んで表示する方法を記載しました。
特に難しい事ではないですけども(汗)
using UnityEngine;
using System.Collections;
public class ResourcesTextureLoaders : MonoBehaviour {
public GameObject _prefab;
public Material _material;
GameObject[,,] _instance = new GameObject[2,2, 3];
private int num = 0;
void Start ()
{
for (int z=0; z<2; z++)
{
for (int j = 0; j < 2; j++)
{
for (int i = 0; i < 3; i++)
{
num += 1;
_instance [z,j, i] = Instantiate(Resources.Load("LoadPrefab")) as GameObject;
_instance [z,j, i].renderer.material.mainTexture = Resources.Load("p" + num) as Texture2D;
_instance [z,j, i].transform.localPosition = new Vector3(i * 80 - 80, j * 80 - 40f, z*80);
_instance [z,j, i].transform.rotation = Quaternion.Euler(90, 180, 0);
_instance [z,j, i].transform.localScale = new Vector3(5, 5, 7);
}
}
}
}
}
※位置や回転やスケールは適当な感じで合わせる為に入れています。
Assets>Resourceフォルダから画像を読み込んでます。