您的位置:首页 > 移动开发 > Unity3D

Unity学习日记-Creating Scripts

2016-01-15 18:33 417 查看
在Unity GUI 中creat script时会自动生成一个模板

using UnityEngine;
using System.Collections;

public class MainPlayer : MonoBehaviour {

// Use this for initialization
void Start () {
<span style="white-space:pre"> </span>Debug.Log("Fuck Me");
}

// Update is called once per frame
void Update () {

}
}

其中class后面对应的MainPlayer需要和脚本名相同,update函数每帧刷新。
Debug.Log里面的内容会出现在Unity的console中。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  unity