- Home /
Slow Loading
I am trying to instantiate 10000 of the same simple sphere model (it is a star field). The models load up and even display the first frame almost right away. The problem is then the game "locks up" for about 15 seconds.
I made a very simple example of this. There is a simple prefab with a sphere inside. In my script I just generate however many you have specified in the script global variable. I give them random positions in the camera's field of view.
I have zipped up the project and attached it. Is this just something I have to live with or is there something I am doing wrong or could do different? link text
sorry, but the default model count is set to 5000 in the zip I uploaded. I made it changeable so I could test different numbers. If you open the $$anonymous$$ainScene and click on the $$anonymous$$ain Camera you can change the 5000 to 10000 to see what I am seeing. 5000 models has about a 4 second delay on my $$anonymous$$ac Book Air.
I also wanted to say that I can't really use particles in this case (if that would help) because I need to interact with the "stars" in ways that they have to be individual models in the scene...that is unless there is another way to do with that I can still RayCast and get which one the user hit and changes its material color and stuff like that.
Answer by Hotshot10101 · Mar 13, 2014 at 09:17 PM
As far as I can tell loading a lot of objects just takes a lot of time. Only Unity can improve this.
Your answer
![](https://koobas.hobune.stream/wayback/20220613083700im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Unity seems to be taking a long time destroying a scene? 0 Answers
A node in a childnode? 1 Answer
Fixed timestep... 1 Answer
Realtime Clock? (needles) 1 Answer
Finish One Combo 1 Answer