Game is really slow

Hiya i made a sonic game on unity when i ever i click play it goes really slow and freezes my computer how can i make this faster and i am not shore of the spec on my pc but it is a good one

Thanks

2 Answers

2

Either you have an enormous amount of to high quality texture (unlikely) or you've done some no-no's when scripting. My guess it the latter.

I'd guess that either you're executing commands from an OnGUI function (which get's called twice per frame + on every event, which is a LOT) or you're calling a lot of things from your update function that you don't have to. Look at this answer I just gave on how to make things happen once instead of over and over again for no reason.

oh! hank so much!\but i had read it and i don’t know how to do it.So…Can you write code that show for me?please!

Use comments to comments, not answers.