Перейти к содержимому

Can't Add Script in Unity? It's Not the File Name (5 Real Causes)

DevForge Unity

0:00 / 0:00

Can't Add Script in Unity? It's Not the File Name (5 Real Causes)

3 просмотра · 5 дн. назад
DevForge Unity
5 подписчиков
3 просмотра · 5 дн. назад
"Can't add script", "the script class cannot be found" or "needs to derive from MonoBehaviour"? Shown with the real Unity 6.5 dialogs: a file name / class name mismatch no longer blocks a script (we tested it, even a two-class file was accepted), so here are the causes that actually do: a compile error in a DIFFERENT script, a class that isn't a MonoBehaviour, abstract and generic classes, and scripts inside an Editor folder or editor-only assembly definition. Full guide (every error message, renaming safely, FAQ): https://devforgeunity.com/unity-cant-... More Unity tutorials: https://devforgeunity.com Chapters: 0:00 Intro 0:30 The file name myth 1:16 Compile errors 1:57 Not a MonoBehaviour 2:25 Abstract and generic 3:01 Editor folders 3:18 Recap #unity #gamedev #unitytutorial #csharp #indiedev