Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by assfsdfgsge · Aug 23, 2013 at 07:45 AM · lagoptimizehow manyfixed array

How to Reduce the lag?

When I start my build and run it Im frozen and then my screen bounces around and then it starts going smoothly except for a a jerk forward every 5 or so seconds, Is there a way to fix this?

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

3 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by Rasp1977 · Aug 23, 2013 at 08:58 AM

That depends on what you are doing in your game.

If you create a simple scene with a plane to walk on and a character controller and nothing else, is it still a problem?

If not, then you need to check your scripts for something that takes a lot of time to run.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Benproductions1 · Aug 23, 2013 at 08:58 AM 0
Share

As good an answer as you can give to such a broad question

avatar image
0

Answer by yoda12 · Dec 05, 2014 at 12:29 AM

Its likely the rendering of game graphics, or a script. It could also be you have a lower end computer. Mine is powerful, but unity limits the Frames Per Second to about 60. First, do you have multiple Update functions in you're scripts? This can cause lag/fps drops. If you also have too many While()s, it can also create lag.

Go into the game window and click "Stats" and a small window should pop up. Now, run the game. If you get about 10 fps, then its likely the games graphics taking up power, or like I said, the Updates. If it freezes, it could be either, but likely the scripts. This has happened to me several times. Try changing function Update() to LateUpdate(), and adding
yield WaitForSeconds(5); Around the script (if its JavaScript), and also disabling some scripts.

This may not work, but you can also try this.[Keep in mind, that you shouldn't rely on the below code, always program games to not take up performance] :

Create a js file and insert this:

 #pragma strict
 
 function Start () {
 Application.targetFrameRate = 300;//Target the frame rate to about 300fps
 QualitySettings.vSyncCount = 0;//This is vsync. This just tells unity to sync framerate to monitors refresh rate. 
 //Turn off vSync for better fps, by turning QualitySettings.vSyncCount to 0
 }

Another option if you have a less powerful computer, is to turn graphics down. Edit -> Project settings -> Quality, then click fastest. I think the freezing is a script thing though.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by enriquee3ppvgaming2 · May 31, 2021 at 11:54 AM

I am so sorry for the late answer, but the reason that happens is because realtime global illumination is turned on, realtime gi doesn't really work good with slow computers...

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

19 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Multiple Cars not working 1 Answer

I made a better shader how do i fix[add _Shadow Strength]help???>Sorry that im asking for to much 1 Answer

Particle memory overhead 1 Answer

10 AI's vs 10 AI's 2 Answers

One specific area of map insanely laggy? 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges