Question by
Syrian_Survivor · Feb 17, 2020 at 02:54 AM ·
lagframeratescalingframerate dropsshrinking
Shrinking/growing object causes framerate drops,Grow/shrink drops FPS?
So I just want to simply make my object (snowball I made in Blender) grow or shrink, using this test code:
public class grow : MonoBehaviour
{
Vector3 temp;
Vector3 temp2;
public Vector3 increase;
void LateUpdate()
{
if (true)
{
temp = transform.localScale + increase;
transform.localScale = temp;
}
}
}
I set the increase to (1, 1, 1) It does work and my object does grow, but when the growing is happening, my FPS drops to like 20, and that's the best it drops, using other code I tried would make it fall to 10FPS, I tried all kinds of updates and tried (if button input)s but it doesn't make a difference, also tried Time.deltatime sometimes, I guess the scale-changing is happening too fast and needs some break time between shrinks?
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220612223444im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Does framerate affect Coroutines? 1 Answer
Frame drop/lag spike ontrigger 1 Answer
deltaTime on fixedUpdate 1 Answer
Unity Not using GPU anymore for anything 0 Answers