Skip to main content
2 of 2
Integrating the answer into OP's perspective.
Vaillancourt
  • 16.4k
  • 17
  • 56
  • 61

Random.Range will return an integer if both min and max are integers. Random.Range(0,2) will return either one or zero. You could use it like this:

Boolean boolValue = (Random.Range(0, 2) == 0);
if(boolValue == true){
    Debug.Log("It's true!");
} else{
    Debug.Log("It's false!");
}
SanSolo
  • 1.2k
  • 1
  • 10
  • 29