「Unity/helloworld」の版間の差分
提供: 初心者エンジニアの簡易メモ
| 行5: | 行5: | ||
*HelloworldScriptをダブルクリックして開く | *HelloworldScriptをダブルクリックして開く | ||
| − | using UnityEngine; | + | using UnityEngine; |
| − | using System.Collections; | + | using System.Collections; |
| − | + | ||
public class HelloworldScript : MonoBehaviour { | public class HelloworldScript : MonoBehaviour { | ||
| − | + | // Use this for initialization | |
| − | + | void Start () { | |
| − | + | Debug.Log("helloworld"); | |
| − | + | } | |
| − | + | // Update is called once per frame | |
| − | + | void Update () { | |
| − | + | } | |
| − | + | ||
} | } | ||
2016年9月8日 (木) 16:47時点における版
helloworld
- File/new project/2Dを選択
- Assets/Create/C#Script
- 下にcsファイルができるのでHelloworldScript.csへ名前変更
- HelloworldScriptをダブルクリックして開く
using UnityEngine;
using System.Collections;
public class HelloworldScript : MonoBehaviour {
// Use this for initialization
void Start () {
Debug.Log("helloworld");
}
// Update is called once per frame
void Update () {
}
}
