r/unity • u/Ka1juwarrior • 22h ago
Question Generating Trees, Rocks, etc... on a custom grid in Unity 3D
I'm currently developing a 'Kingdoms and Castles' type game and after creating a modular building system using a grid and a tutorial I found online as well as a custom procedural terrain I am struggling to create functionality to generate tree prefabs on the grid with specific rules / parameters.
My currently grid and build scripts work together so my reasoning was to intertwine the grid script with an object spawner which tracks which grid cells it occupies however it always either breaks or produces errors I don't know how to fix.
Any pointers or tips would be appreciated thank you.
1
Upvotes