欢迎来到天天文库
浏览记录
ID:34726669
大小:278.18 KB
页数:3页
时间:2019-03-10
《unity3d游戏开发之编写脚本(helloworld)》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、今天学了最基础的打印“helloworld”首先,创建C#脚本(Assets-create-C#Script)可重命名自己需要的名字,双击打开,会弹出u3d默认编辑器打开后的界面在voidStart()里输入代码usingUnityEngine;usingSystem.Collections;publicclasshello:MonoBehaviour{//UsethisforinitializationvoidStart(){print("helloworld");}//UpdateiscalledonceperframevoidUpdate()
2、{}}保存,把脚本拖拽到游戏对象上,或主照相机运行该场景即可看到“helloworld”这篇文章来自狗刨学习网
此文档下载收益归作者所有