2014年7月29日 星期二

Unity 4.3 Script Frequently used API

Unity3d api learning note.


using UnityEngine;
using System.Collections;
public class Move : MonoBehaviour {
 // Use this for initialization
 void Start () {
 }
 // Update is called once per frame
 void Update () {
  //transform.Translate(1,0,1);
  //transform.position = new Vector3(0,0,0);//transform.position.x or .y or .z 
  //transform.RotateAround(Vector3.zero,Vector3.up,20*Time.deltaTime);
 }
}



How to drag Gmae Object in script, first you need create this script:
public GameObject go1; //don't use static key word! , create in class scope
then you can drag object in script like:



Transform Classes: http://docs.unity3d.com/ScriptReference/Transform.html
Total API Reference: http://docs.unity3d.com/ScriptReference/

沒有留言:

張貼留言

© ERIC RILEY , 自由無須告知轉貼
Background Japanese Sayagata by Olga Libby