How to optimize this script to render 1 millions of cubes in same screen? Here’s my code:
- Do it in c++ if possible
- Chunk the loop (ie spawn 100 per frame rather than all at once)
- Use InstancedStaticMeshs
- Possibly use an AsyncThread
1 Like
-
C++ scripting isnt possible because i dont have enough money per month to pay a C++ developer license.
-
What’s this?
-
Idk about these.
-
Neither know about these.
Could you explain my the 3 solutions below here?
you mean like Visual Studio or Rider? both are free now
it simply means instead of looping 1million times (which will give you an infinite loop error), loop 100 times, delay until next frame, loop 100 times etc.
this requires c++ too but basically it uses a seperate thread so the main game thread doesnt freeze