How to Un-Freeze the Unity Editor in Play Mode ❄❄❄

Поделиться
HTML-код
  • Опубликовано: 22 янв 2025

Комментарии • 154

  • @jcm6480
    @jcm6480 5 лет назад +19

    Very helpful, saved me a lot of time trying to figure out what could have been causing my game to freeze, thanks again!

  • @frazoni.
    @frazoni. 4 года назад +18

    Thank you a lot! Even though I have some programming experience, by watching this video, I was able to see that I had an infinte while loop lol.
    Thank you :)

  • @calvindonovan8725
    @calvindonovan8725 2 года назад +2

    Thank you dude , You actually saved my life, years of planning and a whole population ,you're a hero

  • @MrSwan-tm5wj
    @MrSwan-tm5wj Год назад +3

    Also, can freeze if in your project settings time -> timescale is set to 0. No time passes so most things are frozen. Set it to 1 to fix.

  • @JennaWestenra
    @JennaWestenra 4 года назад +4

    Thanks you a lot! You saved my time, my nerves and my will to develop games! I had a problem with a do-while cycle and my game froze editor. After your video, I set up visual studio for debugging and paid attention to the only one cycle I had in my code and that was the point. Thank you a lot for your video!

    • @TurboMakesGames
      @TurboMakesGames  4 года назад

      Hah, nice - glad this helped you figure that out. Keep learning and creating!

  • @tadsavage1611
    @tadsavage1611 4 года назад +3

    Best thing Ive learned all month. Realize I should probably learn how to use visual studio before unity - lol - thanks man.

    • @TurboMakesGames
      @TurboMakesGames  4 года назад

      Glad this helped!! You'll learn more about Visual Studio as you go along, the important part is that you are making games 😀

  • @theseaker6455
    @theseaker6455 2 года назад +1

    Thank you so much! I thought I had to delete and restart my project again, but you saved me from the trouble! Thanks!

  • @tombird6592
    @tombird6592 3 года назад +7

    Extra Tip: If you don't know where to put your breakpoint, then you should be able to push the "Pause" button on the debugger control in visual studio. This will cause the debugger to freeze on whatever piece of code is currently being executed, which should be within your infinite loop (assuming that's actually your problem of course!)

    • @yees_7568
      @yees_7568 3 года назад

      where is the debugger control?

    • @tombird6592
      @tombird6592 3 года назад

      @@yees_7568 At 3:05 he attaches the debugger to unity, you can see at the top of the VS interface a control with three buttons: One with 2 vertical lines (pause), a red square button (stop) and a circle with an arrow in it (restart). It's just below and to the right of the HELP menu.
      Once you have launched your app in Unity and gotten it to freeze, go back to visual studio and click that pause button with the two vertical lines.

    • @yees_7568
      @yees_7568 3 года назад

      @@tombird6592 oh, thanks

    • @TurboMakesGames
      @TurboMakesGames  3 года назад

      Indeed! Thanks for mentioning it 😊

    • @capnnemo5330
      @capnnemo5330 Год назад

      Thank you veryy much! You saved my project. I was going crazy. Couldnt figure out where the loop was. Finally found out.

  • @mesagames8915
    @mesagames8915 3 года назад +2

    U are life saver u have saved my 24 of work I doing straight 24hours making game man I can't tell u how helpful is the video is he deserve 1B subs

    • @TurboMakesGames
      @TurboMakesGames  3 года назад

      So glad to hear this saved your work 😀
      Don't worry, I'll be at a billions subs soon 😁😂😂

  • @RyanCmr07
    @RyanCmr07 2 года назад +1

    I though I needed to upgrade my PC, thanks for saving me so much money and time. Total life saver

    • @TurboMakesGames
      @TurboMakesGames  2 года назад +1

      Hah, glad to hear your PC is still good to go!

  • @byEVxL
    @byEVxL 4 года назад +1

    I waited to long to close unity in my task manager after I got this error and my pc is freezing and it’s about 1 frame per minute I’m gonna have to close my whole pc and probably lose hours of work

  • @lilpanda9177
    @lilpanda9177 4 года назад +4

    Thank you this was the first time I've had an infinite while loop and I was really confused but you helped me a lot!

  • @tomershmaya8852
    @tomershmaya8852 4 года назад +4

    I stumbled here, thinking something wrong with my Editor, and when you've mentioned the infinite while-loop it hit me that I've just added one such loop in a coroutine, and forgot the yield return null! Thanks for the enlightenment.

    • @TurboMakesGames
      @TurboMakesGames  4 года назад +2

      Nice, glad to hear you figured that out! I've definitely done that myself 😂😂

  • @henry9896
    @henry9896 4 года назад +7

    The thing with me is that I didnt even press play.

  • @SomeGuy-my7en
    @SomeGuy-my7en 4 года назад +3

    first time a tutorial has saved me from having to close a program and lose my work!

  • @mateuszzajac564
    @mateuszzajac564 2 года назад +2

    Thank you very much! You saved me from digging through the whole code! :D

  • @VanarikWolf
    @VanarikWolf 2 года назад +1

    Worked for me! Thanks Turbo!

  • @tkurban
    @tkurban 4 года назад +1

    hello i have a problem with unity. I have reinstalled it 5 times already but it always the result. My unity is just frozen i can click on anything in unity. Like the assets folder, cant create new folders etc. Its just frozen. But when i installed it on my laptop it works with out issue.

  • @remystreichenberger1080
    @remystreichenberger1080 4 года назад +2

    You just saved my class project, thank you.

    • @TurboMakesGames
      @TurboMakesGames  4 года назад

      Great to hear! Best of luck with your class project 😀

  • @ZeroCadence
    @ZeroCadence 2 года назад +2

    Thank you so much. My game freezes only when the turret sees the player. So I know basically where to look but this gave me a game plan. Subscribed and liked :-)

    • @TurboMakesGames
      @TurboMakesGames  2 года назад

      Oh cool, glad to hear this helped get you looking in the right direction. All the best with resolving that issue!

  • @PaulMucci
    @PaulMucci Год назад +1

    How ironic. Years of using Unity and watching these videos for quite a while but never watched this one. I can't believe I didn't know I could end an infinite loop using this method. 👍

    • @TurboMakesGames
      @TurboMakesGames  Год назад +1

      Hah, well hope it works out for you if you need it!

  • @Javierattor
    @Javierattor 4 года назад +2

    I removed every script from my project and it stills stops responding/takes forever to load, save or enter play mode.

    • @TurboMakesGames
      @TurboMakesGames  4 года назад +1

      How old is your computer? Is your computer just having a hard time running Unity? Might be worth trying to reinstall Unity also

    • @Javierattor
      @Javierattor 4 года назад +2

      @@TurboMakesGames ryzen 1600, rx5600 xt, 16gb ram 3200. But I think the problem is polybrush, after deleting some of the models I've modified with it the level loaded way faster, and thats a problem because I rely a lot on polybrush...

    • @TurboMakesGames
      @TurboMakesGames  4 года назад +1

      @@Javierattor Yeah you're computer should be fine. I'm not too familiar with polybrush so I don't know about some of the optimizations you can make for it. Do you have a large number of models or some big and complex ones? I could see how you might run into some performance issues in those cases

    • @Javierattor
      @Javierattor 4 года назад +1

      @@TurboMakesGames I use it mostly to modify some terrains I made in blender so they don't look all the same without modeling more, maybe there is some weird incompatibility with the export format I'm using and polybrush.

  • @rc4342
    @rc4342 3 года назад +1

    Oh my god, you just saved me hours of rework! You sir, are a hero.

  • @scratchtutorials1068
    @scratchtutorials1068 4 года назад +1

    unluckily my visual studio was not on the screen. I did not do code.

  • @호빵-l6k
    @호빵-l6k 4 года назад +4

    Thank you so much for this tutorial! You saved me from losing a whole chunk of my work lol

  • @byEVxL
    @byEVxL 4 года назад +2

    It’s not good, I haven’t saved for
    hours

    • @byEVxL
      @byEVxL 4 года назад +2

      I love unity so much I’m gonna have to make my games main menu all over again

  • @Sai_the_potato1
    @Sai_the_potato1 2 года назад +2

    i almost didnt submit my finals all thanks to you sir

  • @abhayshivamurthy8555
    @abhayshivamurthy8555 7 месяцев назад

    I have a similar issue, except it only freezes when in VR using oculus air link. I can't remember exactly what I did that made this happen. The issue doesn't occur if I run the same scene without a VR headset connected. I can still use the editor freely while in play mode in VR, however, the entire editor freezes when I try to exit play mode.

  • @Jocke155
    @Jocke155 3 года назад +1

    This also works in Visual Studio Code, just open the project folder and install the "Debugger for Unity" extension, set it up and hit start. If it attaches correctly you can just stop it to exit play mode.

    • @TurboMakesGames
      @TurboMakesGames  3 года назад +1

      Thanks for sharing!

    • @Jocke155
      @Jocke155 3 года назад +1

      @@TurboMakesGames No problem, thanks for the video! :D

  • @GuillemPoy
    @GuillemPoy 5 лет назад +2

    Isn't it any way to get out of play mode in Unity if the editor is stucked in the while loop?

    • @TurboMakesGames
      @TurboMakesGames  5 лет назад +1

      If the editor is frozen because it's stuck in a while loop, you can't exit play mode normally - you have to do some debugging and fix the broken logic before you can exit play mode as you normally would.

    • @ferenccseh4037
      @ferenccseh4037 4 года назад

      @Sports Mania you asked that 3 months ago, but here's your answer anyways. search for your editor's name (like "Visual Studio") in windows's default searcher. if you can't search for some reason, find it's installation folder and start it with its .exe file

  • @levilujan9890
    @levilujan9890 4 года назад +1

    Thanks! This saved me was a great debug 101, which I was afraid of tackling.

    • @TurboMakesGames
      @TurboMakesGames  4 года назад +1

      Great to hear, glad you got some good results from it!

  • @erenbektas627
    @erenbektas627 Год назад

    i delete the scripts to my project but the freez in play mod still continue .how can i resolve this probleme ?

  • @JasonPegasus
    @JasonPegasus Год назад

    how i do if i dont have the button?

  • @Sledge_Warrior
    @Sledge_Warrior 2 года назад

    Help when I attempt to make it false it says this vale could not be seg

  • @makramboukaiz3303
    @makramboukaiz3303 4 года назад +1

    thank u so much this video literally save me months of headaches, ty again!!!

    • @TurboMakesGames
      @TurboMakesGames  4 года назад +1

      So glad to hear this helped you out so much 😀

  • @edward3190
    @edward3190 2 года назад +1

    what are the other possible reason for freezing? I can't find any loop in update()

    • @edward3190
      @edward3190 2 года назад +1

      I figured it out, I was making a number divided by 0 in update and using that number in a lerp function...

    • @TurboMakesGames
      @TurboMakesGames  2 года назад

      Thanks for the update, glad you figured it out!!

  • @basictriipz3662
    @basictriipz3662 3 года назад

    Hi my problem is when I can click play my code doesn't run even thought my code is good.

  • @caiovinicius5631
    @caiovinicius5631 4 года назад +2

    Thanks man, awesome vídeo, helped me a lot!!

  • @limageur
    @limageur 4 года назад +1

    Hi, thanks for the video but it does not work for me.
    When I start Debug I cannot use the steps s icons.
    Also, I cannot change a bool like you do .
    I am under Visual community 2019.

    • @limageur
      @limageur 4 года назад +1

      If I make pause to Debug it says that the code is not compatible... "Debug does not take this with threads" but I have a quad core what the hell ?

    • @TurboMakesGames
      @TurboMakesGames  4 года назад +1

      Are you using the C# Job system or some other method of multi-threading? If so debugging might be a bit more complicated than how I demonstrated in this video. Maybe this article will be a good starting point for you: docs.microsoft.com/en-us/visualstudio/debugger/debug-multithreaded-applications-in-visual-studio?view=vs-2019

  • @groupa10coil5
    @groupa10coil5 2 года назад +1

    Thanks bro. I manage to fix it. I had the same while loop

  • @ChiemelaMgbeahuru
    @ChiemelaMgbeahuru Год назад

    How did you open visual studio?

  • @TrippleBoing
    @TrippleBoing 4 года назад +2

    Saved my life, bro

  • @joumanahaddad7576
    @joumanahaddad7576 4 года назад +2

    This helped me a lot thankssss

  • @babyyodaslightsaber6882
    @babyyodaslightsaber6882 3 года назад

    the problem is i dont have the script open

  • @The-Athenian
    @The-Athenian 2 года назад +1

    Damn, I can't seem to find this in VS Code, I guess I'll finally give in and change over to VS Studio.

    • @TurboMakesGames
      @TurboMakesGames  2 года назад

      Or better yet, upgrade to JetBrains Rider 😁 - it's a paid software but worth its cost many times over IMO

  • @strmoon
    @strmoon 2 года назад +1

    Thank you so much , you solved my save

  • @rudragoenka4572
    @rudragoenka4572 4 года назад

    I am unable to select the step into function .Pls help me

    • @TurboMakesGames
      @TurboMakesGames  4 года назад

      Why isn't it letting you step into a function?

    • @rudragoenka4572
      @rudragoenka4572 4 года назад

      @@TurboMakesGames idk why

    • @TurboMakesGames
      @TurboMakesGames  4 года назад

      @@rudragoenka4572 What happens when you try?

    • @rudragoenka4572
      @rudragoenka4572 4 года назад

      @@TurboMakesGames I see the button but it is black and white and when I press f11 nothing happens

    • @TurboMakesGames
      @TurboMakesGames  4 года назад

      @@rudragoenka4572 Are you sure you are in Debug mode and it is attached to Unity? If so, has your program hit a breakpoint? If your program hasn't hit a breakpoint, it will just continue running as normal and wouldn't allow you to step through your code

  • @rory5103
    @rory5103 4 года назад

    It won't let me step

  • @AlexM-xj7qd
    @AlexM-xj7qd 3 года назад +1

    Very helpful. saved me

  • @ferenccseh4037
    @ferenccseh4037 4 года назад +1

    unity fixed itself while I was watching this video, so thanks I guess?

    • @ferenccseh4037
      @ferenccseh4037 4 года назад +1

      But it's great to have that knowlede! Thank you again!

    • @TurboMakesGames
      @TurboMakesGames  4 года назад

      😂😂 Glad I could help!

  • @karinakasemaa9269
    @karinakasemaa9269 3 года назад +1

    Thank you so so much!

  • @yarikar
    @yarikar 3 года назад

    A live saver, thank you!

  • @Xboxsnubben
    @Xboxsnubben 3 года назад

    Can you use an break;" ?

  • @ayoubnasr5531
    @ayoubnasr5531 3 года назад

    Thankyou so much man!!!

  • @geforce7224
    @geforce7224 3 года назад +1

    Thanks, bro you saved me...

  • @AdamSmitha
    @AdamSmitha 4 года назад +1

    Great very helpful.

  • @-lesresetredemounir8365
    @-lesresetredemounir8365 4 года назад

    Tnx bro you help me and with an easy method 🙏

    • @TurboMakesGames
      @TurboMakesGames  4 года назад

      Niiiice! Glad to hear this worked for you 🙌

  • @byEVxL
    @byEVxL 4 года назад +1

    Unity really be like “hmm he defintley didn’t want 7 hours of work saved let’s delete it wtf I hate my life

    • @LoOnarForge
      @LoOnarForge 4 года назад

      No offense, but if you don't save for 7 hours then guess whose fault this is? I am guilty of it myself. I got a sticker at the top of the monitor to remind me about it.

    • @chronosbat
      @chronosbat 3 года назад

      Even fucking roblox studio is better at saves. Unity needs some cloud storage thingy that has autosaves on it.

  • @charleswaltson7110
    @charleswaltson7110 4 года назад +1

    I knew my code had something to do with the freezing so I closed my Visual Studio. Dang.

  • @ahmedbyahmed4405
    @ahmedbyahmed4405 4 года назад +1

    You save me bro tnx very much

  • @Alex.4847
    @Alex.4847 3 года назад +1

    I did that and my unity crashed ;-;

    • @TurboMakesGames
      @TurboMakesGames  3 года назад +1

      Oh no 😲
      Hope you didn't lose too much work!

    • @Alex.4847
      @Alex.4847 3 года назад

      @@TurboMakesGames like 20m of work but that's ok

  • @user-hq3zi2fh9e
    @user-hq3zi2fh9e 2 года назад

    My case for every while:
    int whileCount =0;
    while (your bool || whilrCount>9999)
    {
    //your function ();
    whileCount++;
    }
    if(whileCount>9999)
    Debug.LogError("infinity while");

  • @devo_step
    @devo_step 2 года назад +1

    THANKS

  • @whattwheels
    @whattwheels 2 года назад +1

    thxxxxxxx so much

  • @sicknostalgia9934
    @sicknostalgia9934 10 месяцев назад

    Thank you

  • @beratigon6213
    @beratigon6213 4 года назад +2

    Oh yeah yeah

    • @TheDizzyDan
      @TheDizzyDan 3 года назад

      the meme has been dead for 2 years...

  • @furizagold
    @furizagold 2 года назад +1

    thx

  • @PrashantUnity
    @PrashantUnity 4 года назад

    Thank you ...

  • @lucutes2936
    @lucutes2936 2 года назад

    i cant open VS lol

  • @ImusingX
    @ImusingX 2 года назад

    thaaaaaaaaaaaaaaaaanks

  • @sanjaykeer789
    @sanjaykeer789 4 года назад +1

    Ohhhh ohhhh ohhhh my god ohhhhhh I m Indian in 6th I just done while(true) to if (false) love from India thankest thank uuuuuuuuuu thank uuuuuuuu I was trying full 4 hours and I got this but my scored stopped becuz of restart button😭😭

    • @TurboMakesGames
      @TurboMakesGames  4 года назад

      Haha glad to hear this helped you fix the problems you were having! It's often something simple but it can be tough to track down sometimes especially when the game is freezing.

  • @randomlynate
    @randomlynate 4 года назад +2

    I will subscribe if this works lol

  • @argarevata642
    @argarevata642 3 года назад +1

    Thankyou so much. Really helpful