Ok, based of everyone's suggestions, and after trying quite a few different things, I sort of found a solution. I had to delete the MoveC script, then close vs code. I then opened vs code again, created a new script but changed the name from MoveC to MyMoveC.hlsl. I then pasted back my old MoveC code, but had to change the name of the Move struct as well. I then changed all references to both the struct and the MoveC script. I then had to close vs code and open it again, and finally all the errors disappeared. However, if I only changed the name of the script, or the struct, but not both, I would still get the same errors, and if i didn't close and restart vs code in between it also would't work. Does anyone have any idea what was going on?