11/03/05 20:34:46.38 VUijh9i8
>>576
なるほど、スクリプトで動的にって事ね。私もスクリプトで出来たらと思ってるのよね。
めんどうだもんな、Inspectorで設定するのって、抜けも怖いし。ご存知の方教えて下さい。
Unity Game Development Essentials
Unity 3D Game Development by Example
この2冊を読んだんだが、どちらもprefabをInspectorで設定してInstantiate()している。
入門書なのでこの方法しか紹介されていないのかもしれない。
> GameObject.Find()はprefabにも使えるのかな?
Unity Game Development EssentialsのP115に
「The Find command selects an object in the current scene by its
name in the Hierarchy and can be used as an alternative to using tags.」
って書かれている。なのでprefab名をダイレクトに指定するのは無理そう。
Instantiateしてインスタンス名ならいけそう。
インスタンスの命名についてはUnity Game Development EssentialsのP163に書かれています。