Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only. On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live. Read our full announcement for more information and let us know if you have any questions.

Resolved Didn't work in play mode

Discussion in 'Getting Started' started by oguzkaancomoglu, Oct 20, 2021.

  1. oguzkaancomoglu

    oguzkaancomoglu

    Joined:
    Aug 18, 2021
    Posts:
    52
    Hi, Everyone.
    I'm new in Unity but almost 2 months I'm working on it. I'm developing a racing game and a couple days ago I open my project and click to run it and the play screen become frozen. I tried many thing but it didn't work( I changed unity version, also I completely remove and install it). Also I tried some assets (vehicle physics pro) its not worked. I have tried same assets in my friend computer, it's worked.
    Where do you think the problem might be?
     
  2. Schneider21

    Schneider21

    Joined:
    Feb 6, 2014
    Posts:
    3,512
    Welcome to the forums. Unfortunately we're going to need a lot more information than what you've given us in order to be able to help.
    1. Are there any error messages in the console?
    2. What are your PC specs?
    3. What changed in your project from when you could open it to when you couldn't?
    4. Do you have a backup of your project you can try restoring from? (If not, this is a great time to learn how to do that using Git)
    5. Could you record a video or grab some screenshots of the issue happening so we can see what's going on?
     
  3. oguzkaancomoglu

    oguzkaancomoglu

    Joined:
    Aug 18, 2021
    Posts:
    52
    My answer your questions in order,

    1. The answer to this question is a bit complicated, I had more than one project but all of them was working despite minor error message. There is an sample errors picture below.
    Note 1: I tried the same asset(Vehicle Physics Pro) as seen in the first picture on another pc. Same error appeared there but the game worked. This is what made me doubt. 1 week ago this asset was working on my computer.
    Note 2: I installed standard assets and I fixed gui error. I click to play button, game started.(This asset does not give any error while running.) So Something came to my mind,Is there a setting that won't run the project even if it's the simplest error?

    2. Nvidia gtx1650 , intel i5.

    3. I didn't remember :(

    4. No I haven't. I wish I knew.

    5. There is a picture. If you want video, I can record it.

    upload_2021-10-20_17-21-29.png

    upload_2021-10-20_17-3-44.png
     
  4. Schneider21

    Schneider21

    Joined:
    Feb 6, 2014
    Posts:
    3,512
    Okay, so it seems to me that the issue isn't that your screen is frozen, it's that you're getting errors in your console and your game doesn't respond to input or anything, right? If that's all that's happening, you need to look at the errors and check the code that it's pointing to (Mudguard.cs line 24 and BrakeLight.cs line 22) and see why they're throwing NREs. my bet would be there are values that need to be assigned in the Inspector.
     
  5. oguzkaancomoglu

    oguzkaancomoglu

    Joined:
    Aug 18, 2021
    Posts:
    52
    Yes not responding. The game also has AI, they don't move.
    You are right I have to fix errors, but same scene working on other computer with same minor error. Why my computer not allowing working with minor error. If the same scene is running on another computer, shouldn't it work for me too?
     
  6. Schneider21

    Schneider21

    Joined:
    Feb 6, 2014
    Posts:
    3,512
    Is the exact same code running on both machines? Without being able to see it running, I can't really tell you anything more about what's happening. From those screenshots I can tell you there are NullReferenceErrors happening at those two points, but whether they're preventing execution from happening later in the loop isn't clear from this alone.
     
  7. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    A freeze in play mode almost always indicates your code has entered an infinite loop. Why it would behave differently on different hardware depends on the code. Null reference errors will cause the remaining code in the same method to be skipped, which can cause unintended behavior when the skipped code is important to the rest of the game.
     
  8. oguzkaancomoglu

    oguzkaancomoglu

    Joined:
    Aug 18, 2021
    Posts:
    52
    sorry for the late reply, I've had the flu for a few days so I couldn't write. In the video which I shared below, same asset were downloaded to two different computers from unity asset store and tested. Computer gaved same error but friends(ozkan pc) worked mine didn't worked.



    I do not object to the consequences of the errors you have stated. But don't you think there is something strange about this? working on one computer and not working on another?
     
  9. Valjuin

    Valjuin

    Joined:
    May 22, 2019
    Posts:
    481
    Review on Asset Store:
    upload_2021-10-23_21-0-20.png

    Ozkan’s PC:

    upload_2021-10-23_20-58-41.png

    Your PC:

    upload_2021-10-23_20-58-56.png
     
    oguzkaancomoglu likes this.
  10. oguzkaancomoglu

    oguzkaancomoglu

    Joined:
    Aug 18, 2021
    Posts:
    52
    Valjuin likes this.
  11. mcraftaag

    mcraftaag

    Joined:
    Mar 18, 2022
    Posts:
    1
    I kinda had the same problem but the problem was that I had an Infinite loop
     
  12. Tony_D7

    Tony_D7

    Joined:
    Oct 28, 2020
    Posts:
    4
  13. RichAllen2023

    RichAllen2023

    Joined:
    Jul 19, 2016
    Posts:
    1,026
    Looks like your PC's crashed! If you have a recent backup of your game, restart and it might all work.
     
  14. nurbagus7

    nurbagus7

    Joined:
    Jul 2, 2022
    Posts:
    4
    oguzkaancomoglu likes this.