- Home /
Visual Studio Not Opening Right Script
Hello, this is a bit of a weird problem. I am trying to use Visual Studio 2017 to edit my scripts, but when I click to edit one of my scripts, it opens the same script, no matter what I click on. Example:
I click on a script named "script1"
it opens "script2"
I try to open "script1"
it still opens "script2"
Ive noticed this happens to me when I have them in separate windows. Are you doing this or are they all in one window.
Answer by GrayLightGames · Oct 11, 2019 at 09:38 PM
Hard to say what's up without more information... are you clicking on the scripts inside Unity? You might navigate to the scripts folder and delete the .meta files for each script. Unity will regenerate. Do you have the same class in each script?
You can also try copy pasting each script, deleting the script and then creating them fresh. I've had some funky stuff happen when I renamed a class without renaming the file, so building it from scratch should sort that out. Hope that helps!