- 859 名前:名前は開発中のものです。 mailto:sage [2015/08/10(月) 21:19:10.44 ID:7mxq3sqw.net]
- エラーはこれです
error CS0120: An object reference is required to access non-static member `UnityEngine.Component.transform' error CS1502: The best overloaded method match for `UnityEngine.Transform.SetParent(UnityEngine.Transform, bool)' has some invalid arguments CS1503: Argument `#1' cannot convert `object' expression to type `UnityEngine.Transform' 親のソースはこれです public GameObject obj; void Update () { Instantiate(obj,new Vector3(0.0f, 0.0f, 0.0f),Quaternion.identity ); obj.transform.SetParent (Canvas.transform ,false); } objにはインスペクタで増やしたいオブジェクトを入れています 子に書いてゲットコンポーネントもするのが正解なのか…うーん・・・
|

|