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.

No longer codes since changing Projects directory

Discussion in 'Getting Started' started by Iron-Anubis, Jan 23, 2023.

  1. Iron-Anubis

    Iron-Anubis

    Joined:
    Nov 24, 2013
    Posts:
    2
    I'm sorry if I sound short but I've been fighting this for 3 days at about 6 hours each.

    Originally Unity and VSCode was working fine. However about 2 days after going thru Tutorials, I forgot I had a second hard drive on this machine. I set that up real quick, moved items over and told Unity to use the new Hard Drive Project folder to do the work.

    Ever since then, this has been a nightmare of trying to figure out why its failing to the point I'm about to uninstall this and be done with it as I haven't proceeded on any work.

    Now whenever I attempt to code *anything* on *any project* (new, old, prior, deleted and recreated 100%) *nothing* is recognized on VS as a shortcut term and nothing is recognized as even being coded in Unity.

    I put a float for MoveSpeed for grins and giggles, it doesn't show up on the attached sprite Script on the right as if it never sees it.

    I try to set Rigidbody2d as a variable in the code, I get this in Unity and it doesnt even auto fill Rigidbody2d despite having the plugins and UnityEngine using statement.

    Assets\plyrMoveTest.cs(10,12): error CS0246: The type or namespace name 'Rigidbody2d' could not be found (are you missing a using directive or an assembly reference?)

    (NOTE, I have not done ANYTHING with Rigidbody2d, this is just the declaration!)

    What I've done so far.

    Uninstalled UnityHub, Editor, and VSCode entirely, rebooted, reinstalled.
    Completely deleted my project and made a brand new one on the new folder area.
    Under Preferences -> External Editor, played with every setting under the sun there and regenerated the project files with every check box reset.
    Reset the arguments in the aforementioned area.
    Deleted the csproj file and recreated it manually.
    Looked for the SLN files (sin? sln?) and could not find them nor cause them to generate.
    Looked for resolutions on moving the project from one folder to another. (it keeps referencing something about Version Control Meta Files. These options do not exist in anyway, shape, or form and even the tutorial doesn't show them on the screenshots. Mind Boggling.)

    I'm completely out of options and after 3 days, I'm almost tempted to do to SFLM. I dread moving my project to my Linux box to even do anything further with this.

    Any advice would be appreciated.
     
  2. RichAllen2023

    RichAllen2023

    Joined:
    Jul 19, 2016
    Posts:
    975
    DON'T do Unity projects on Linux, I know from PAINFUL experience that they simply do NOT work, despite Linux allegedly being a supported OS.
     
  3. AngryProgrammer

    AngryProgrammer

    Joined:
    Jun 4, 2019
    Posts:
    283
    Linux is good for a server, not a desktop. Sooner or later something won't work again and you'll spend days fixing it instead of working with Unity.

    I have attached a visualization of the above description.
     
  4. Iron-Anubis

    Iron-Anubis

    Joined:
    Nov 24, 2013
    Posts:
    2
    I'll just get something else. My issue started with Windows and Coding but people seem to have focused on one sidde sentence.
     
  5. BABIA_GameStudio

    BABIA_GameStudio

    Joined:
    Mar 31, 2020
    Posts:
    447
    It is definitely showing that you have made a typo. It is
    Rigidbody2D
    , not
    Rigidbody2d
    . Capitalisation matters in your code.

    I suspect that the other problem with the float is simply because you also have other errors in your script, because errors will stop the script from being compiled and therefore will not put any public variables or serialised fields into the Inspector for that script.
     
    halley likes this.
  6. RichAllen2023

    RichAllen2023

    Joined:
    Jul 19, 2016
    Posts:
    975
    I hate to be pedantic but watch your spelling when you're doing code, it's 2D, not a lower case d.

    Just trying to be helpful is all :D
     
  7. halley

    halley

    Joined:
    Aug 26, 2013
    Posts:
    1,530
    Oh, the irrational OS war thread unleashed again. Drivel. There should be a forum rule against it.
     
    Ryiah likes this.
  8. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    18,894
    What you've described is very common with Unity and VS Code, and a large part of the reason is that it was never truly an officially supported editor. It was added during a weekly hackathon, was never fully functional, and hasn't had updates in years. A few months back it was announced that the integration package would be discontinued.

    https://forum.unity.com/threads/update-on-the-visual-studio-code-package.1302621/

    Unfortunately when it comes to Linux the only choices available that will consistently work are Script Inspector 3 which runs inside of the editor and is thus platform independent, and JetBrains Rider. Both of these cost money.

    https://assetstore.unity.com/packages/tools/visual-scripting/script-inspector-3-3535
    https://www.jetbrains.com/rider/
     
    Last edited: Jan 24, 2023