Frame Rate Issue

Hello everybody,

something weird is happening when I run my game (or even after building it), the game keeps giving little frame drops like this

it’s like it’s 60-60-60-11-60-60-60-1-60-60-60-11and soon

I don’t know why or this happened since it has started to happen just right now today

if you have any answer please post it here I’m very experienced and smart don’t worry

thanks in advance.

Are you spawning any objetcs?

No problem I have solved it myself

here’s how to anyone having the same problem:

I had about 50-60 spawning scripts looping ray casts I have fixed this problem by making them all united under single caster that casts the Ray once

also thanks for @Bunny83 for this:-

If you get a cyclic framerate drop it
has to be something “cyclic”. A common
case would be the physics system
(FixedUpdate) since it usually runs at
a lower rate than the normal Update.
By default the physics rate is set to
50fps (0.02sec or 20 ms). Since your
frame time is larger than the time
required for one physics step, Unity
will have to call FixedUpdate multiple
times per frame.

With the information given we can only
guess what you’re doing in your game /
application. You should edit your
question and add more information. For
example if you’re using the physics
system, how many objects you have in
your scene, etc… Just presenting
symptoms without any information on
the possible causes makes it
impossible to give an answer.