- Home /
how to enchance the performance when there are hundreds of cube on the scene and each cube has the independent script
when the scene start ,there is thousands of cube on the scene,the cube can move and turn around behaviour.the script is easy but there are many script and update method in the meantime.how to enchance the performance?
Not sure how you move your cubes around. In the improbable case it is not physics (Rigidbodies, forces, ...) and you don't need collision detection for them, remove any colliders from your cubes. Transfor$$anonymous$$g and updating collider information for the physics engine is particularly expensive.
the Cube need to move on the track like train , so i need to add the collider and rigidbody on the cube,because the cube need to turn while crossing road.so in the crossing has the trigger to detect the cube need to turn left or right.
Are you sure your cubes are your problem? It's likely, but not necessarily true. Your scene seems very complex, too. $$anonymous$$aybe use fewer triangles, or more importantly, reduce the number of drawcalls. Is it all one mesh? If so, split it up, so the camera can do frustum culling.
Compare the number of DrawCalls with and without cubes, and post these numbers here.
I use the profiler tool,it shows the model used many resource.But i need the model so complex that can simulation the real environment.So how to reduce the draw call instructint.
Your answer
![](https://koobas.hobune.stream/wayback/20220613092117im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
s-pen GUIUtility.BeginGUI performance problems 0 Answers
Best way to access game objects 0 Answers
2D Side Scroller Background 3 Answers
Export Profiler Information 1 Answer
Game Performance 1 Answer