Original message (verbatim)
CS0103: The name 'name' does not exist in the current context
Placeholders such as %s / %d are kept verbatim from the engine source and are not replaced with concrete values.
Trigger
At Unity script compile time, an identifier referenced inside the current scope does not exist (misspelled variable or method, missing using, a field declared elsewhere, or inside a conditional block), and Assembly-CSharp fails to compile.
Typical cause
The Roslyn compiler cannot find the name in the current class, namespace, or scope, emits CS0103, and the script does not produce an assembly.
Step-by-step fix
- Check the identifier spelling and casing, and confirm the variable or method is declared in a visible scope of the same class.
- Add the missing using directive for the namespace.
- Check whether the member is excluded by a conditional compilation define.
Source links
Per-entry sources and capture date are listed at /sources#U21.
Related errors
Related Unity errors
Need an offline quick-reference checklist?
Atlas error library Pro pack: 123 error references (110 single + 13 merged) plus a quick-fix guide, $19 one-time purchase, delivered as electronic files.
Back to the all-errors index Checkout and buy the Pro pack — $19.00