This is a Unity script that spawns Easter eggs in a random location around the player object within a certain radius. The Easter egg prefabs are randomly selected from a list of available prefabs.
- Spawns Easter eggs in a random location around the player object within a certain radius.
- The number of Easter eggs spawned can be limited by setting the
maxEasterEggs
variable. - The Easter egg prefabs are randomly selected from a list of available prefabs.
- Attach the script to an empty GameObject in the Unity scene.
- Set the Easter egg prefabs in the inspector by adding them to the "Easter Egg Prefabs" list.
- Set the maximum number of Easter eggs to spawn by setting the "Max Easter Eggs" variable.
- Run the scene.
This script has no external dependencies but you might want to create an EasterEgg.cs class for your eggs. One has been included as an example - adjust to fit your needs.
This script is licensed under the MIT License.