Unity/Csharp/クラス
クラスやプロパティ
public class CanvasScript : MonoBehaviour {
private int cnt = 1;
void Start () {
Debug.Log("helloworld" + cnt);
Add(10, 15)
}
void Update () {
}
public int Add(int x, int y) {
return x + y;
}
}
メンバはpublicとprivateがあり省略するとprivateになる。