23/01/18 01:17:56.54 gb9xw2nh.net
回答ありがとうございます。
>>357自分がやりたいのはこれです。
for文を使ってやってみたのですがaの値が同じになってしまいます。
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class practice : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
int a = Random.Range(1, 11);
int b = 0;
for (int i = 0; i < 3; i ++)
{
b += a;
}
Debug.Log(a);
Debug.Log(b);
}
}
これだとコンソールに3,9や5,15, 10,30と表示されます。
b = a + a + aも駄目でした。