How can I pre-generate a grid instead of generating it on each runtime?
So basically, I am creating a system where you can build, it works by having the game manager create two grids, one for wall placements(any prefab which is placed on a wall) and another for floor placements(base foundation or ramps which lie ontop of base). In the picture you can see the red representing the wall placement nodes and the green representing the floor placement nodes.
As you can see there is a lot to generate, and generating the same grid each time I want to play is obviously not efficient, especially since I want to make the grid much bigger, but at the moment I left it this size just for testing.
My query is that I want to see if it is possible to generate these nodes once and have them saved in the scene, so that they will already be there on load up. Also the nodes are only shown for testing purposes, whenever I want I can easily make them transparent with a simple click!
If anyone can help I will be very grateful!
Thanks in advance!
Answer by Klusimo · Nov 04, 2020 at 03:30 PM
Try [ExecuteAlways], it allows you to run code while in editor, if thats what you mean, or maybe trying to work witht he object version of grid (in scene).
Your answer
Follow this Question
Related Questions
Creating a grid on top of a terrain 0 Answers
Grid territory system 0 Answers
Rotating a grid, 0 Answers
How to make gridbased movement while also using collision? 0 Answers