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 scopethen you can drag object in script like:
Transform Classes: http://docs.unity3d.com/ScriptReference/Transform.html
Total API Reference: http://docs.unity3d.com/ScriptReference/
沒有留言:
張貼留言