• 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 aca85 · Feb 08, 2018 at 10:25 PM · editorcrashprofilerdebuggingtroubleshooting

How to determine which part of the game is crashing Unity Editor

HI all,

When i play my game in the Unity Editor, it runs for about 15s and then Unity freezes. I tried the profiles but i don't know what to look for. Even if i manually disable parts of the code and find out which part of the code is causing it, how do i troubleshoot/debug the problem? I am quite inexperienced and new to Unity5

I really appreciate any help you can provide me. Thanks.

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

1 Reply

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

Answer by nathanvj · Feb 08, 2018 at 10:37 PM

Unity Editor crashes are often caused by infinite loops. Check all loops in your code one by one, especially the while loops. Make sure you don't have any infinite recursive function. What script function (that contains a loop) could be called at the 15th second?

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 aca85 · Feb 09, 2018 at 02:21 PM 0
Share

Yes, you are correct. When i took a closer look at the code i found that in a loop i was transferring a object from one place to another (changing parents) and in once case there were no more object to transfer and the condition was always true after that so a endless loop with a recursion started to happen.

avatar image gnostici · Apr 16, 2020 at 03:39 AM 0
Share

Well, heck... I've been fighting a crash all day. I've wanted to test the number of entities I can instantiate in batches, so why not go batch by batch, watching the Entity Debugger until I see the stopping point? I could gave 8 million on screen two days ago, and this is much more optimized, and... oh. 3100.

Guess this explains it.

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

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

107 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 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 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 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 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 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

What is the recommend way to debug an Editor crash? 1 Answer

Android Development Build Crashing After Splashscreen 2 Answers

Is there a way to check the performance in edit-mode? 1 Answer

Unity iPhone is crashing whilst running my game - how to debug? 2 Answers

Unity Editor Crash after project is loaded 1 Answer

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges