2012-12-01から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…
Timeクラスのプロパティ プロパティ 内容 time ゲームが始まってからの時間 (Read Only) timeSinceLevelLoad 現在のレベルがロードされてからの時間 (Read Only) deltaTime 最新のUpdateのインターバル (Read Only) fixedTime FixedUpdateが開始されてからの…