Unity Tip: Unity Crashed! Why? (Log files) #shorts #unity #gamedev

preview_player
Показать описание
✅ If Unity crashes you can't see the console, but the log is saved in a file!
👍 Learn to make awesome games step-by-step from start to finish.

💬 Sometimes you might write some code that crashes Unity, when that happens it's very useful to be able to read the logs.
But since Unity crashed you can't see the console.
Well it turns out that logs are saved as files which you can inspect to see what went wrong.

If you have any questions post them in the comments and I'll do my best to answer them.

See you next time!

#unitytutorial #unity3d #unity2d #unity​ #gamedev​ #indiegame​ #gamedevelopment #madewithunity​ #indiedev​

--------------------------------------------------------------------

Hello and Welcome!
I'm your Code Monkey and here you will learn everything about Game Development in Unity using C#.

I've been developing games for several years with 8 published games on Steam and now I'm sharing my knowledge to help you on your own game development journey.

I do Unity Tutorials on just about every topic, Unity Tutorials for Beginners and Unity Tutorials for Advanced users.

--------------------------------------------------------------------
- Other great Unity channels:
--------------------------------------------------------------------

Рекомендации по теме
Комментарии
Автор

💬 How many times have you accidentally crashed Unity? For me it happens rarely but when it does being able to read the logs is super useful!

CodeMonkeyUnity
Автор

When you run the code in your brain and realize it will result in stack overflow, but it is too late and unity already crashed...

sadiqabbaszade
Автор

Great Tip.

Also to get the scene back you were working on but didn't save for a while.
Go to your project's directory, then Temp and __Backupscenes.
The file is called 0.backup. change the file to the new name and add .UNITY as the extension. You should be able to open

rodparsons
Автор

Hello CodeMonkey! Another useful tip...

jean-michel.houbre
Автор

7 years of using Unity and I did not know this one :O

gamheroes
Автор

I hate accidentally making infinite loops that crash Unity, it happened to me a few days ago

DARK_AMBIGUOUS
Автор

This is awesome! Could you do a tutorial on switching input with arrow keys from player movement to navigating a pause menu / main menu? I’d love to see how you would separate the input events as components.

CCV
Автор

Hey Code Monkey it's good to have ya on my notifications again. I recently took bravery and decided to learn c# now and Unity.

CreativeSteve
Автор

Well this was just in time lol. Thanks for linking this vid

xmimagma
Автор

Really usefull, never broke it that hard but its nice to know how to act if it ever happens

NameUnknown-
Автор

Good stuff. I'd be curious to see common design patterns, for example I know the sample project uses behaviors. Maybe dependency injection or unit testing. It's tricky to translate my enterprise life into unity life. 💕

AnnualSeveral
Автор

And you know when you hit a critical error when no errors were even thrown in the logs.

MrJohnweez
Автор

so how analyze editor.log file? Where should I see? Tons of texts.

DimensionEnterprise
Автор

A man that even know how to crush a project

kcatholywater
Автор

A useful thing I saw happen in Dyson sphere program and I now use for builded project is to show in the screen the logs.

FyresGames
Автор

Thanks, this is very useful thing to know, though personally I prefer being on the safe side and preventing an infinite loop altogether with a counter. Especially when testing code, I like doing something like this:

int counter = 0;

while ([normal loop conditions] && counter < 9999) {
//code that may cause an infinite loop
counter++
}

if (counter == 9999) {
Debug.LogError("Infinite Loop!");
}

paulblart
Автор

TBH, I knew there was a log for years but it never provided me any help : [

abclef
Автор

I nearly failed a project a couple years ago cause of this. Where was this video when I needed it😑. Jk I'm glad you made this anyway to help future devs.

TheKing-velz
Автор

When ur pc is just too bad that it dosent load any buttons

DEDGUY
Автор

If something has to crash it will. Murphy's Law.

diliupg