Weighted Randomization

FREE
Publisher Chris Kugler
File size 248.05kB
Number of files 6
Latest version 1
Latest release date 2017-08-11 10:57:23
First release date 2015-05-14 10:49:22
Supported Unity versions 2018.4.2 or higher
A weighted randomization would be when you have several values that you want to present with different odds between them. For example, consider values A, B, and C. If you were to decide that you want one of these 3 values, but you want A to occur 20% of the time, B 40%, and C 60%, that would be a weighted randomization. The odds of each value are potentially different, and adding to 100%. These classes will provide you the tools to define and implement your own weighted randomization. I used this myself for creating templates for enemy types in an RPG, and allocating points to stats based on the weights defined by the template.

Top Publisher Assets