Skip to content

An easy way to create weighted tables for randomized selection that can be easily edited in the unity inpector

License

Unlicense, Unknown licenses found

Licenses found

Unlicense
LICENSE
Unknown
LICENSE.meta
Notifications You must be signed in to change notification settings

PatchWorkCoding/WeightedArray-Package

Repository files navigation

Weighted Array

WeightedArray-Showcase-Bettererest-resized

Purpose:

An easy way to create weighted tables for randomized selection that can be easily edited in the unity inpector

Requirements:

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()

Methods:

  • 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

Misc:

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!

About

An easy way to create weighted tables for randomized selection that can be easily edited in the unity inpector

Resources

License

Unlicense, Unknown licenses found

Licenses found

Unlicense
LICENSE
Unknown
LICENSE.meta

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages