質問編集履歴

2

追記&修正

2019/12/25 07:33

投稿

Y0241-N
Y0241-N

スコア1066

test CHANGED
@@ -1 +1 @@
1
- 【Unity】【C#】独自クラスの要素すべてをforeachを使っDebug.Logに表示したい
1
+ 【Unity】【C#】独自クラスの異なる型のすべての要素楽に取り出して表示したい
test CHANGED
File without changes

1

追記&修正

2019/12/25 07:33

投稿

Y0241-N
Y0241-N

スコア1066

test CHANGED
File without changes
test CHANGED
@@ -36,7 +36,19 @@
36
36
 
37
37
  }
38
38
 
39
- public List<CustumData> ProductList; ←すでに複数の異なるCustuDataを持っているとする
39
+ public List<CustumData> ProductList;
40
+
41
+
42
+
43
+ ProductListの中身は例として以下のような状態とする。
44
+
45
+ ProductList[0] = 5,10,pen
46
+
47
+ ProductList[1] = 2,7,desk
48
+
49
+ ProductList[2] = 8,45,watch
50
+
51
+ ProductList[3] = 14,3,sword
40
52
 
41
53
 
42
54
 
@@ -44,7 +56,7 @@
44
56
 
45
57
  {
46
58
 
47
- 次にaの中身をすべて取り出して表示したい
59
+ 各ProductList[n]の中身をすべて出したい
48
60
 
49
61
  }
50
62