Hi Ryan,
That’s probably an issue with Visual Studio, not with your code. See the “wrong” colour of MonoBehaviour. It should have the same colour as your class name.
Please try the following suggestions:
- Restart Unity and VS.
- Is Visual Studio selected as your External Script Editor in Unity (Edit > Preferences > External Tools)?
- Are the Unity development tools installed in VS (Tools > Extensions and Updates)? If they are not installed, go to Tools > Get Tools and Features.
- Please check if your scripts are included in the project in Visual Studio. Open the Solution Explorer with Ctrl + Alt + L. A dotted icon indicates that the object is not included. If that’s the case, do the following:
- Reboot your PC.
- Close both Unity and VS. Go to your project folder and delete all sln and csproj files. Then start Unity again, double click on the script file inside your Assets folder in Unity.
- Try to update VS.
- Try to update Unity.
Did any of these fix the issue for you?