【3Dゲームエンジン】Unity質問スレッド17 [転載禁止]©5ch.net
■ このスレッドは過去ログ倉庫に格納されています
0669名前は開発中のものです。
2015/05/24(日) 17:35:51.62ID:91YaIcLypublic GameObject canvas;
GameObject damegetextA = Instantiate (damegetext, Camera.main.WorldToScreenPoint (transform.position), Quaternion.identity)as GameObject;
damegetextA.transform.parent = canvas.transform;
Text DT = damegetextA.gameObject.GetComponent<Text> ();
DT.text = "9999";
上記のようにプログラムを作りました。
Inspectorでcanvasとdamegetext(gameobject>UI>Textで作成したもの)は設定してあります。
コレを実行するときちんと動いてくれて、自分自身の場所にダメージ(9999)が表示されるのですが、黄色い三角で下記のようなエラーが大量に出てきます。
解決方法(そもそも何のエラーがググっても出てこず困っています)等わかる方いたらご教示をお願い致します。
Parent of RectTransform is being set with parent property.
Consider using the SetParent method instead, with the worldPositionStays argument set to false.
This will retain local orientation and scale rather than world orientation and scale, which can prevent common UI scaling issues.
UnityEngine.
Transform:set_parent(Transform)
■ このスレッドは過去ログ倉庫に格納されています