Quantcast
Channel: Questions in topic: "dynamically"
Viewing all articles
Browse latest Browse all 152

Slow Performance to dynamically create meshes in Editor.

$
0
0
Hello, I am working on a game where most parts of the world are dynamically generated from custom data. During the work in the editor, the meshes needs to be present. I am talking in the magnitude of around 2.000 - 3.000 game objects with mesh renderer, however the mesh assets are almost only instances of around 10 different prefabs. I have a script that does the data generation. My problem is, that the generation is extremely slow. The editor hangs for minutes while creating the instances of the same mesh. (If I would add a mesh collider to my prefabs, it would probably take hours). For testing, I changed the "mesh" in the prefab to be just a single triangle, but it did not improve the speed at all. So my question: Is it possible in Unity to generate thousands of game objects in a scene in the editor (and later at game startup)? What settings do I need to tweak to fast-create thousands of game objects in a sane amount of time? ------- Edit: Could it be that Unity is just not made for a couple of thousand GameObjects per scene? (When generating without hide flags, even loading this beast scene takes ages.) Any experiences from other larger projects? I am thinking now whether I could have only one game objects present in the editor which manages the vertex buffer, render batches and the collider manually. Is there such a low level API access possible in Unity? Any resources where I can start learning?

Viewing all articles
Browse latest Browse all 152

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>