hi guys, i created a weapon and put it into my scene for testing, but it seems to kill my fps dramatically, its only 110 tris with a 15kb texture, i do not understand? could somone please explain. thanks ![]()
perhaps its your script?
without the weapon in the scene i have 200+ fps?
sure its the weapon and not the UI?
yes, without the weapon and the UI open i have 200+ fps
Do you have any scripts attached to the weapon? If so, what are they doing?
i have, both one to rotate the weapon slowly and one for the weapon properties however after disabaling both the fps does not increase ![]()
no I mean really the ui aka the inventory there
there are more differences between the screens than just that.
so any of them might be it and out of experience Iām willing to bet that it is not the model of the sword (not even on an intel CPU to DVI adapter, also called intel gpu, you would get such a drop, not even if it was 40k poly ^^), but some code that is running in a loop suboptimal or totally suboptimal UI code (ongui is called multiple times per frame so donāt have loops in there and donāt process input in there etc)
but i dont understand why it only drops when the weapon is in the scene⦠even with the script enabled or disabledā¦
Can I see a wireframe of the model?
Did you test if it also drops the fps if your inventory script is disabled
What system are you running? Itās not going to help you, Iām just being nosy. ![]()
Sometimes I have noticed that a script that is unticked runs anyway. Correct me if I am wrong however it has happened.
Try removing the script from the object, it does sound as if some sort of loop on the object(the slow rotation for instance) is causing the slowness. Can you post that code?
heres the requested wireframe:
also upon exporting as 2010 FBX, i deleted all history, removed animation, lighting.
Are you accessing components through āgetComponentā functon?. Your getComponent calls, where are them?
It is strange; 54k of tris?.. isnāt too much guys?
theres 120 tris, not even 1k ![]()
and no the sword currently has no scripts at all, or colliders, just the texture. The texture is 1024x1024, but only 15kb im not sure that the fact its 1024 matters?
Use the Profiler (Window->Profiler). With DeepProfiling you can easily see whether a script is the culprit, and even the line of code that is the most expensive.
EDIT: Oh, thatās a Pro feature :o) but an extremely useful one.


