Set up with Map Magic infinite terrain
Vegetation Studio with Map Magic
This is a guide for how to set up Vegetation Studio with the Infinite terrain system from Map Magic.
It will show you how to create vegetation on the run-time created terrains.
Included with Vegetation Studio is a component called MapMagicInfiniteTerrain that will connect to Map Magic and get events when a new terrain is generated.
To get started make sure you have a Vegetation Studio GameObject in your scene.
In my test scene it is set up with these trees for the main terrain.
Make sure “auto select terrain” is turned off and your main terrain in the scene is selected.
Move the VegetationSystem component as a child object of your main terrain. This is to make sure vegetation on that terrain is disabled if your main terrain gets out of range during playmode.
Only do this when you are finished making your Map Magic terrain. If you rebuild it with the VegetationSystem component as a child it will be destroyed.
Add a MapMagicInfiniteTerrain component to the VegetationStudio root GameObject.
Drag and drop the VegetationSystem component you moved as a child to the center terrain. This will be the source component for vegetation. All new terrains will get a clone of this configured with the correct terrain.
All needed settings is now done.
Try to enter playmode.
Depending on your Map Magic settings it will now spawn new terrains and a clone of the VegetationSystem component is added to the new terrains. As it is an child object of the terrain it will be enabled/disabled/destroyed with the terrain. All controlled by Map Magic.
This last image shows the 4 terrains loaded with the same vegetation.
Good luck testing.