Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Bug Getting missing references for no reason

Discussion in 'Code Editors & IDEs' started by NewMagic-Studio, Nov 21, 2023.

  1. NewMagic-Studio

    NewMagic-Studio

    Joined:
    Feb 25, 2015
    Posts:
    448
    Hi,
    Dont know why i am suddenly getting errors in visual studio saying i have no references for many classes, Unity doesnt give any error and everything works fine but in visual studio i cannot find the methods of the classes as for visual studio dont exist, some of which dont exist for visual studio are UnityEngine.UI, UnityEngine.XR and UnityEngine.InputSystem. I have those installed in Unity and the app works fine when i press play
    The only thing i did was creating a assembly in unity and then delete
     
  2. APSchmidt

    APSchmidt

    Joined:
    Oct 31, 2023
    Posts:
    239
    And then delete what?
     
  3. NewMagic-Studio

    NewMagic-Studio

    Joined:
    Feb 25, 2015
    Posts:
    448
    the assembly definition
     
  4. APSchmidt

    APSchmidt

    Joined:
    Oct 31, 2023
    Posts:
    239
    And what happens if you restore the assembly definition?
     
  5. NewMagic-Studio

    NewMagic-Studio

    Joined:
    Feb 25, 2015
    Posts:
    448
    I am already using a backup i had
     
  6. NewMagic-Studio

    NewMagic-Studio

    Joined:
    Feb 25, 2015
    Posts:
    448
    This bug is really absurd, i made a backup of the project with errors just in case... and then i realized i could replace the project files with the ones of the backup, i did so and worked. I had the project backup in other hard drive, then i copied this project to the other hard drive and when i tried to open with unity didnt work, had the same missing references. Then i put the project inside another folder and then it worked, somehow didnt work just in the specific folder path i had when started to fail