Introduction
Varia is a Unity addon for adding random variation
Let's do a simple example to demonstrate how Varia works. Create a new scene, and add a cube, then a VariaRandomRotation component to it.
When you hit play, the cube will be randomly rotated about the y-axis by a random amount.
That's it! The majority of Varia's basic components all work similarly - they make a small randomized change to a game object when it starts, i.e. when loaded into the scene or instantiated from a prefab.
By annotating your game objects with Varia components, you can introduce random variation to stop your game feeling samey and repetitive. Once you delive into the more advanced features of Varia, you can generate complex objects and scenes without writing a line of code.
Here's a few ideas of what you can do with Varia components:
- Randomly tint and scale NPCs to make a crowd look less homogenous
- Pick between several alternative enemies for the player to fight.
- Swap out alternative sprites to make placing scenery easy.
- Add special powerups that are only only appear occasionally.
- Browse the supplied samples for a showcase of some of Varia's features.
Once you've mastered the basic components, you can learn how to use the more advanced features:
- Use VariaPreviewer to quickly prototype and visualize more complex randomizations directly in the editor.
- Use the condition system to control if the changes are applied at all.
- Instantiate recursive prefabs to make elaborate Lindenmayer systems - great for trees and plants