An easy way to create weighted tables for randomized selection that can be easily edited in the unity inpector
when adding the weighted array to your code you must be include:
- 1.
using PatchworkCoding.WeightedArray;
- 2. "Validate()" method of the weighted array to your script's
void OnValidate()
- 1.
GetElement()
Gets a random element from the array with consideration to its weight - 2.
GetElementAtIndex(int i)
Gets an element at "i" index of the array
If you need help or the package ends up breaking you can get in touch via email at theroyott@gmail.com or through twitter @patchworkcoding.
Hopefully y'all find it useful!