What do you want to save?
Add Code snippet
New code examples
-
C# 2021-10-18 02:58:06
how to randomize ther order of elements in an array in unity
using UnityEngine; using System.Collections; public class DeckShuffle : MonoBehaviour { public GameObject[] decklist; private GameObject tempGO; void Start () { Shuffle(); } public void Shuffle() { for (int ... Add solution -
Other 2021-10-15 01:08:11
how to never have 2 same values from random function in unity
List<int> usedValues = new List<int>(); public int UniqueRandomInt(int min, int max) { int val = Random.Range(min, max); while(usedValues.Contains(val)) { val = Random.Range(min, max); } return val; } Add solution -
C# 2021-10-14 21:01:04
c# pick a random item from array
list[Random.Range(0, list.Count)]; Add solution -
-
C# 2021-10-11 13:37:05
random number generator without duplicates c#
using System.Linq; public int range; public int MyNum[]; public int KnownNumbers[]; public int UniqueNumbers; private void MyNumbers() { MyNum = new int[range]; for (int i = 0; i < range; i++) { MyNum[i] = i; } } private ... Add solution -
C# 2021-10-08 20:45:09
randomly generate objects in unity
/* How to randomly generate unity objects in the scene. Watch this video by Blackthornprod on YouTube: 'RANDOM MAP GENERATOR - EASY UNITY TUTORIAL' https://www.youtube.com/watch?v=D4EOgZyNk-k&list=PLVAEGKvcbdfRiaRqY03T-oUMGr-Z-5Cyl&index=12&t... Add solution
Best helpers
Ranking is empty