#Take a screenshot of your profiler

1 messages · Page 1 of 1 (latest)

restive pine
river niche
#

This is the hierarchy

#

What I meant is Application.Tick

restive pine
#

ah well then that makes more sense

river niche
#

On the selected frame it only takes 2.65 ms

restive pine
#

in play mode it takes more

river niche
#

You'll need to select a frame where the framerate drops.

restive pine
#

its in edit mode rn so maybe thats the cause

river niche
#

Then profile again when the frame rate drops and select a more representative frame

restive pine
#

here so i selected play mode and now the problem is that i cant see the detail on editorloop

#

if i want to see what causes the framedrop, and that is only possible with playmode, but i cant see the details on editormode, which is the actual cause of the framedrop then how can i find the problem at all ? maybe im just retarted idk

river niche
restive pine
#

application.idle is taking most ms ??

river niche
#

This could theoretically be some kind of editor asset/plugin.

#

Does this happen in a new empty project?

river niche
# restive pine

Was that taken during actual play mode(not in profiler, but in the game tab)?

restive pine
#

i mean i can just tell you that i never got a random framedrop before i put an object in front of my camera that serves as a weapon

restive pine
# river niche What does that object have?

before it was just a gun for example, its a parent of 2 cubes put together which looked like a simple gun, then a gun sway script on the parent to make the cubes "sway", then looking at the ground it causes a massive framedrop for some reason. also the case without the "sway script"

river niche
restive pine
#

youre right

#

i didnt play while recording

river niche
#

So that was not taken in play mode..?

restive pine
#

no

river niche
#

Ok, then that doesn't really tell us anything

restive pine
#

during play mode

river niche
#

Expand the topmost branch(UpdateScene) a few times

restive pine
river niche
#

It also looks like you have some crazy amount of vertices/triangles being rendered(almost 100 million)

restive pine
river niche
#

Expand it more

#

The topmost one. No need to expand anything else.

restive pine
restive pine
river niche
river niche
# restive pine

It looks like it's waiting for the GPU to finish rendering, so it seems like your triangles count is the cullprit.

river niche
#

You can see what objects are rendered and their details in the frame debugger. Maybe use it and take a screenshot

restive pine
river niche
#

Windows - Analysis - frame debugger if I remember correctly

restive pine
#

under camera.renderer ?

#

what do we need here ?

river niche
#

Start by expanding both the Drawing categories

#

Wait, are you still testing with both the scene and game view docked?

restive pine
#

nope

river niche
#

Go throw all the draw mesh commands and see how many vertices they have.

restive pine
#

in a script ?

river niche
#

What script?

#

Select the draw commands one by one and check. Select the first one and take a screenshot

restive pine
#

this one has 2400

river niche
#

Yes. Check all the draw commands for things that have more than a million

restive pine
#

found it

#

its the underarm

#

i mean forearm sorry

#

7 million is crazy wtf

river niche
#

You probably have more unoptimized meshes. Why does it need so many vertices?

restive pine
#

i dont know it really doesnt have that much in blender i swear thats so weird

#

if i check the stats in blender then it shows a lower number

river niche
restive pine
#

verticles

#

from the forearm in blender i can show you

river niche
#

do it

restive pine
river niche
# restive pine

Do you have any modifiers on that object? And is that even the correct object?

#

Also, it would help if you show the mesh details in unity as well

restive pine
#

same amount one the other modelk

#

subdivision and edgesplit are on these models

#

these are the modifiers

river niche
#

I'll also point out that the mesh in question is Unterarm.001, not just Unterarm

river niche
#

blender probably doesn't show it untill you apply it. And when you export the model, it's applied automatically.

#

Not sure about edgesplit.

restive pine
#

so i should just get subdivison out of there

#

it probably isnt even noticible

#

tbh

river niche
#

Yes. Or export without applying the modifiers

restive pine
#

would be simpler

#

yeah found the problem

#

thanks bro it was the subdivision

#

much better performance now

#

sorry for taking that much of your time btw

river niche
#

It's fine. Hope that taught you a few things, so that you can solve this kind of problems yourself in the future.