I'm working on a game where I want to choose which object to spawn based on probabilities. MeaningAssuming the decision to spawn the object has been done by some other process, I'd like the object with the highest probability shouldto have a higher chance of being spawnspawned. An object with 50% spawn probability should spawn more often than an object with 15% spawn probability. I also need to account for instance where a game object has the same spawn probability
GameObject 1 .50 GameObject 2 .25 GameObject 3 .25
GameObject 1 .50
GameObject 2 .25
GameObject 3 .25
What's the best way toHow can I implement this logic?