- Home /
Performance problems after adding "some" Objects + Script
Hello,
I'am new with Unity and I have currently a small Performance Problem. What I do is,
- I Instantiate a Prefab of an Sphere (Planet) , about 50 and add an Component (JS Script) to each Planet
- I Instantiate a Prefab of an Rock for every Planet, about 30 , parent it to the Planet, place it on the Surface, and add an Component (JS Script) to each Rock.
And the the Performance Problems Starts. Them models at all are not High Poly so I get Max 125k Tris at the View port.
When I didnt add the Component JS Script to the Rocks it works fine. But the Script does nothing at all, I just use it to store Data for the Rock which it is assigned to.
Is just the Number of Objects with assigned Components to High? (50 * 30). Or is there somewhere else the Problem? The Planet btw have an Sphere Collider and the Rocks Capsule Colliders.
- Paul
You would need to post your script for us to look at. The number of objects sounds fine so it most likely a poorly optimized script.
Answer by X-Tender · Aug 22, 2010 at 10:28 AM
Ok it looks like that it was an hardware problem with my PC. Sorry for asking ;)