2012-12-08から1日間の記事一覧
現在のScriptがアタッチされているGameObject以外のGameObjectにアクセするには次の方法がある。 1)Inspectorでアサインする public変数としてGameObjectを定義し、Inspector上で該当GameObjectをアサインする方法。 簡単だが、この方法だとScriptだけで完…
Componentとは、GameObjectに付加する部品のようなもの。一般的には、GetComponent("Component名") で取得する。javascript GetComponent(Transform).Translate(0, 1, 0);C# using UnityEngine; using System.Collections; public class example : MonoBehav…