Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Unity refuses to work

Discussion in 'Getting Started' started by Wannibal, May 25, 2023.

  1. Wannibal

    Wannibal

    Joined:
    May 25, 2023
    Posts:
    2
    Hi, I have been learning unity and everything went fine until I had to reset my laptop for another issue. After that, nothing has worked again no matter what I try. I have saved the files of the games on a separate hard drive so they are fine, but I can't get them to work.

    I installed unity and VScode the same way as before, with the C# and unity extensions. However, scripts don't want to compile, don't recognize the worh 'Behaviour' in monobehaviour, don't recognize newly defined variables (like float transx= some code; and the error is that it doesn't recognize transx). Tooltips or code suggestions don't work at all. First, it just repeated the word you type, but now it proposes all kinds of useless things and when I click away or type a dot, it writes that word, overwriting the word I was typing. Can anyone help me please?
     

    Attached Files:

  2. AngryProgrammer

    AngryProgrammer

    Joined:
    Jun 4, 2019
    Posts:
    431
  3. Wannibal

    Wannibal

    Joined:
    May 25, 2023
    Posts:
    2
    Hi, thanks for the reply! That was not the issue. The preferences were set to VScode and that didn't work. I changed them again and reloaded everything, but that doesn't work either. I downloaded Visual Studio (the normal one, not code), and it has the same problem.
     
  4. Sooly123

    Sooly123

    Joined:
    Aug 24, 2022
    Posts:
    88
    so you used this https://code.visualstudio.com/docs/other/unity for a guide, correct?
    If so, (or it will probably work anyway) open the package manager (window -> package manager), remove Visual Studio Editor and Visual Studio Code Editor packages (by clicking on them and pressing the remove button in bottom right corner), next in the top left there is a plus symbol, next to it is dropdown saying "Packages: In Project". click on it and select "Unity Registry". scroll down until you find; Visual Studio Editor and Visual Studio Code Editor. install them (in bottom right corner).
    If this doesn't fix your problem please tell me.
     
    Last edited: May 27, 2023
  5. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    20,082
  6. Sooly123

    Sooly123

    Joined:
    Aug 24, 2022
    Posts:
    88
  7. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    20,082
    Some of us have had success, some of us have had no success, some of us have constant intermittent problems with it, and all of us have tried everything you and many others have suggested to make it work properly.

    None of that matters though for two reasons: (a) Unity officially deprecated it in the recent releases, and (b) is in the process of making sweeping changes to the scripting pipeline that when complete will make the official asset cease functioning altogether. Once that happens your only choice will be old releases or the community asset.
     
    Last edited: May 27, 2023
  8. Sooly123

    Sooly123

    Joined:
    Aug 24, 2022
    Posts:
    88
    ok so basically your answer is use rider:
    download: https://www.jetbrains.com/lp/dotnet-unity/
    setup: https://www.jetbrains.com/help/rider/Unity.html