title: How to prevent repetition of the same number with Random.Range?
body: <p>I have a function that produce random number at certain range, i use it for spawning object using array index, but i confused when i instatiate 3 object sometimes 2 object are same, it's mean there are 2 same number on different array. i wan to check its already saved in array or not. can you guys help me ? , Thanks</p>
  
  <pre><code>void buatobjek (){
  
      for (int i = 0; i &lt; 2; i++) {
          buatrandom = Random.Range (0, jumlahrandom);
          simpannomorobject [i] = buatrandom;
  </code></pre>