• 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
0
Question by FlammingFart · Jan 17, 2013 at 05:22 PM · lag

my game is so lag

i dont know what happened but my game turned so lag, whenever i load my game. first was main menu wont work. my main menu texts contains this scripts ex."START GAME" (hover script and the script to load the game ex. application.loadlevel(1);) but then when i click the "START GAME" i doesnt work, it just loop in the main menu again.

so i jumped into the game and the lag happened, and whenever i play the game skipping the main menu because of the loop my game lagged, so lag i cant even move my main player

please help

Comment
Add comment · Show 4
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 FlammingFart · Jan 17, 2013 at 05:30 PM 0
Share

main thread raises to 330+ what could be wrong?

avatar image Meater6 · Jan 17, 2013 at 05:35 PM 0
Share

You don't really give any information except that there's lag. There are many reasons why there might be lag. Without the coding, or at least know what you are trying to do, we'll just be shooting in the dark. Please revise your question.

avatar image BilboStabbins · Jan 17, 2013 at 05:45 PM 0
Share

If you have the Pro version use the Profiler:

http://docs.unity3d.com/Documentation/$$anonymous$$anual/Profiler.html

avatar image Doireth · Jan 17, 2013 at 05:48 PM 0
Share

Is "application.loadLevel" contained within a loop?

Are you using any/many Debug.log calls?

2 Replies

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by FlammingFart · Jan 19, 2013 at 05:47 PM

thanks for the help.. i found the answer :D its in the health script, a nasty loop ( like Appication.LoadLevel(0) )

Comment
Add comment · Show 2 · 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 Zarenityx · Jan 20, 2013 at 02:23 PM 0
Share

Good.I have been working a lot on optimizing my game. It lags on my fairly good computer, and I am planning to make it a webplayer. Static typing really helped me make my scripts faster (The main problem is still the graphics, though.)

avatar image FlammingFart · Jan 22, 2013 at 03:56 PM 0
Share

:) graphics... $$anonymous$$e is object, because i imported .obj file and some of that is .max in animation >.< so what was that supposed to mean? : that .max file could not be played(animation) in unity? or should i import other object like .fbx or some stuff?

cause i cant play the animation :/

avatar image
0

Answer by Zarenityx · Jan 18, 2013 at 03:47 PM

There are many sources of lag. If you weren't before, put #pragma strict at the beginning of all your scripts, then deal with any errors that occur afterwards (without deleting the #pragma strict). This will force you to use static typing, which will make your scripts faster.

A very common one is graphics. Go here to find ways to solve these.

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.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

12 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

Related Questions

Tiles Slow Down Game 0 Answers

Spammed by "Sending Message Header Failed" warnings 2 Answers

Animation Lag 0 Answers

Somes problems on my 2D space shooter game (Unity 5.5.0p4) 0 Answers

Dynamic shadows decrease performance in android. 1 Answer


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