I’m making a strategy game similar to Hearts of Iron or Europa Universalis. The map is split up into provinces, each province is created by procedural generation where the app reads a Color map of the world, and then generates meshes for each province.
When each province’s mesh is created, it Instantiates a “Province” prefab and adds the Mesh to it. Each province and mesh becomes its own game object. The reason I do this is because I want each province to have its own attributes and functions.
In the end game, I want to be able to have 750 - 1200 provinces. But currently even with only ~150 provinces or so, my Unity becomes incredibly slow and if I select a Mesh in Scene View, it takes many seconds before the mesh actually get selected. Sometimes Unity crashes.
It seems as if it’s mostly the Unity Application, Scene View and Inspector that gets slow. Not the game itself within the “Game” window. The game have good framerate.
So… What am I doing wrong? Is it bad practise to have many Game Objects in Unity? Is it because I do Procedural Generation and for that reason everything is kept in Memory or something like that?