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

Question LTS Ubuntu with Unity and Visual Studio Code

Discussion in 'Linux' started by Joggla, Aug 10, 2023.

  1. Joggla

    Joggla

    Joined:
    Dec 2, 2019
    Posts:
    88
    Just installed LTS Ubuntu on my machine and installed Unity with the Unity Hub.
    After that I installed Visual Studio Code with the following extensions:
    upload_2023-8-10_14-23-15.png
    Set the Editor to Visual Studio Code in Unity, and all seems good....
    Also installed the .net SDK
    All works, but the intellisense for Unity specific API things like .transform, OnEnable(), and that stuff is not showing up.
    Pls help me. How can I get the intellisense to work for Unity API related stuff?
    thanks
     
  2. tylerinthezoo

    tylerinthezoo

    Unity Technologies

    Joined:
    Jun 15, 2022
    Posts:
    82
    Joggla likes this.
  3. Joggla

    Joggla

    Joined:
    Dec 2, 2019
    Posts:
    88
    thanks for the response. The link you gave me was actually the one post I followed to get it to work somewhat.
    When I open up a .cs file in Visual Studio Code I get this error:

    upload_2023-8-10_22-31-3.png

    Not to sure about this output.
    However the post does mention that I need something called OmniSharp... :
    "2. Open VS Code and install de C# extension OmniSharp (you will be asked to install it when you open VS Code). After tah close VS Code"

    Again this extension does not show up under extensions so I cant install it:
    upload_2023-8-10_22-34-10.png

    However under settings I found this:
    upload_2023-8-10_22-38-18.png

    But even after switching on OmniSharp nothing changes.
    Thanks for reading and any help welcome.
     
  4. tylerinthezoo

    tylerinthezoo

    Unity Technologies

    Joined:
    Jun 15, 2022
    Posts:
    82
    the omnisharp is should be the c# in the extension store.
    i suggest delete that csproj file then and regenerate all the project files.
     
  5. Joggla

    Joggla

    Joined:
    Dec 2, 2019
    Posts:
    88
    I think I know what the problem is....
    It seems Mono is not installed correctly.
    But if I follow this:
    https://www.mono-project.com/download/stable/#download-lin
    I keep getting errors.
    I tried this:
    https://www.mono-project.com/docs/getting-started/mono-basics/
    just to see if Mono works.
    However I cant even compile my file with:
    csc hello.cs
    or
    mcs hello.cs

    meaning there is something wrong with Mono

    Edit:
    I followed this:
    https://linuxize.com/post/how-to-install-mono-on-ubuntu-20-04/?utm_content=cmp-true

    and now Mono is correctly installed and working.
     
    Last edited: Aug 10, 2023
    tylerinthezoo likes this.
  6. tylerinthezoo

    tylerinthezoo

    Unity Technologies

    Joined:
    Jun 15, 2022
    Posts:
    82
    glad to hear you got it all working!