Quick Start Guide
Eidolon.Random
is a comprehensive Unity package designed to elevate your game development experience by providing a robust suite of randomization utilities. Whether you need to generate random numbers, colors, vectors, rotations, or even simulate normal distributions, this package has you covered.
1. Generate Random Boolean:
RandomBool
method returns a random boolean value with an optional probability of being true. By default, the probability is set to 0.5, providing a simple way to introduce randomness.
2. Generate Random Integer:
RandomNumber
method returns a random integer between the specified range (inclusive on the min and exclusive on the max), allowing for diverse random number generation.
3. Select Random Element from Array:
RandomElement
method picks a random element from an array, providing flexibility in selecting random items from a predefined list.
4. Generate Random Color:
RandomColor
method generates a random color, offering a quick way to introduce variety in color selection.
5. Generate Random 3D Vector:
RandomVector3D
method returns a random 3D vector within specified ranges, facilitating the creation of diverse spatial positions.
6. Generate Random 2D Vector:
RandomVector2D
method generates a random 2D vector within specified ranges, useful for 2D game development.
7. Generate Random Rotation:
RandomRotation
method returns a random rotation, allowing for random orientation adjustments. This can be used in either 2D or 3D games.
8. Generate Random Angle in Radians:
RandomAngle
method returns a random angle in radians, providing a flexible way to introduce random angular values.
9. Generate Random 2D Vector on Unit Circle:
RandomOnUnitCircle
method returns a random 2D vector on the unit circle, useful for directional randomness.
10. Generate Random Value from Normal Distribution:
RandomNormalDistribution
method returns a random value from a normal distribution with specified mean and standard deviation.
11. Select Random Audio Clip from Array:
RandomAudioClip
method selects a random audio clip from an array, enhancing audio variety in your project.
12. Select Random Element from List:
RandomElement
method selects a random element from a generic list, offering flexibility in managing dynamic collections.
13. Generate Random Float:
RandomFloat
method returns a random float between the specified range (inclusive on the min and exclusive on the max), allowing for diverse random float generation.
Feel free to integrate these methods into your Unity project for versatile and controlled randomness!