facebook twitter hatena line email

「Unity/Csharp/クラス」の版間の差分

提供: 初心者エンジニアの簡易メモ
移動: 案内検索
(ページの作成:「==クラスやプロパティ== public class CanvasScript : MonoBehaviour { private int cnt = 1; void Start () { Debug.Log("helloworld" + cnt); Add(10, 15) }...」)
 
 
(同じ利用者による、間の40版が非表示)
行1: 行1:
==クラスやプロパティ==
+
[[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になる。
+
[[Unity/Csharp/クラス/アクセス修飾子]]
 +
 
 +
[[Unity/Csharp/クラス/クラス分割]]
 +
 
 +
[[Unity/Csharp/クラス/継承元から継承先実行]]
 +
 
 +
[[Unity/Csharp/クラス/インターフェイス]]

2022年8月8日 (月) 15:08時点における最新版

Unity/Csharp/クラス/基本

Unity/Csharp/クラス/アクセス修飾子

Unity/Csharp/クラス/クラス分割

Unity/Csharp/クラス/継承元から継承先実行

Unity/Csharp/クラス/インターフェイス