Так? Или я не понял что ты хочешь?
public class MyIntUpdater:MonoBehaviour
{
public int intA = 10;
public int intB = 20;
public int intC = 30;
public int intD = 40;
private void UpdateMyInt(ref int intVar)
{
intVar+=5;
}
public void Update()
{
switch(Random.Range(0,4))
{
case 0:
UpdateMyInt(ref intA);
break;
case 1:
UpdateMyInt(ref intB);
break;
case 2:
UpdateMyInt(ref intC);
break;
case 3:
UpdateMyInt(ref intD);
break;
}
}
}