Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Unity crashes when I open a line of code.

Discussion in 'Scripting' started by GEV07, Aug 20, 2019.

  1. GEV07

    GEV07

    Joined:
    Aug 19, 2019
    Posts:
    2
    When I open a line of code, Unity crashes. I have no idea why. I am using the latest version of Unity (2019.2) on MacOS Mojave. The scripts work in game but if I try to modify the code, Unity crashes. Does anyone know how to fix this?
     
  2. SparrowGS

    SparrowGS

    Joined:
    Apr 6, 2017
    Posts:
    2,536
    What do you mean "open a line of code"?
     
    Joe-Censored likes this.
  3. csofranz

    csofranz

    Joined:
    Apr 29, 2017
    Posts:
    1,556
    Perhaps shed some more light into what's happening to you so we can work out what's wrong:
    1. Are you able to open the script in a code Editor? Being on the Mac, I guess you are using MonoDevelop?
    2. While you are in the Code Editor without doing anything, is Unity still alive?
    3. When you change code in the code Editor, does Unity Crash immediately, or can you continue editing? Can you Show us the code that you are editing?
    4. At which point exactly does Unity crash, and how do you know that it crashed (this might be a an important distinction:
      - does Unity Crash ("quit unexpectedly") or
      - merely hangs unresponsively (indicating that you just wrote an endless loop)
    I'm sure we can get this squared away quickly if we have enough Information.
     
  4. GEV07

    GEV07

    Joined:
    Aug 19, 2019
    Posts:
    2
    When I try to open the code editor, it crashes the whole program.
     
  5. csofranz

    csofranz

    Joined:
    Apr 29, 2017
    Posts:
    1,556
    Which program? Unity or MonoDevelop? And how do you open the code editor? By double-clicking on a script in Unity, or be double-clicking on an error in Unity's console, or...

    You really should invest more time into your problem description.
     
    SparrowGS likes this.
  6. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    If you aren't willing to take the time to properly explain your issue, don't expect anyone to do so helping with your issue.

    At least mention obvious things like what program is crashing, exactly what did you click on or press which causes the crash, what error message if any do you see, what to the log files for the crashing program say about the crash, etc, etc. Lazy questions get lazy answers.
     
    SparrowGS likes this.