【3Dゲームエンジン】Unity 2
■ このスレッドは過去ログ倉庫に格納されています
0332293
2011/01/21(金) 11:11:05ID:nX/PFrk5//外部FBXのスポーン
private GameObject obj;
string FBXFileName="Corn";
obj = Resources.Load(FBXFileName) as GameObject;
Instantiate(obj, Vector3.zero, Quaternion.identity);
obj.transform.localScale = new Vector3(100, 100, 100);
obj.name = "HelloCorn";
あとは、おまけ
画像
private Texture2D ImageTex;
string ImageFileName="title";
ImageTex = Resources.Load(ImageFileName, typeof(Texture2D)) as Texture2D;
サウンド
private AudioClip mySound;
string SoundFileName="bgm";
mySound = Resources.Load(SoundFileName, typeof(AudioClip)) as AudioClip;
シェーダ
private Material newMat;
string MaterialFileName="stone";
newMat = Resources.Load(MaterialFileName, typeof(Material)) as Material;
renderer.material = newMat;
お目汚し失礼しました。
■ このスレッドは過去ログ倉庫に格納されています