Hello everyone, hope somebody can help me out. When dragging my introducer script on to a object the following window appears, see attachment. I’ve no idea how to fix this, please help
Hi Cas,
Does the file name match the class name inside the file? For example, is the Introducer class inside the Introducer.cs file?
Hello Nina,
Thank you for replying!
What do you mean by ‘class name’?
What do you mean by ‘Introducer class’?
According to your screenshot, the class is named Introducer.
Is that the reason for the error massage?
What do I have to type to solve it?
Is the script named “Introducer”, too? It must not be named "Introducer " or something like that.
If it is named correctly, 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?
After executing step 3 the problem was solved! I could drag the script onto the object.
I’m a bit puzzled by your message, here’s why:
- The script was named “Introducer” because the video told me to do so.
- I changed the name of the script and another error message appeared. I named it back into “Introducer” and the error disappeared.
Anyways a big thank you for helping me out!
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.