What's the role of 'using' directives in resolving CS0246?

Responsive Ad Header

Question

Grade: Education Subject: Support
What's the role of 'using' directives in resolving CS0246?
Asked by:
58 Viewed 58 Answers

Answer (58)

Best Answer
(349)
'using' directives tell the compiler where to look for classes and other types. If you're using a class from a specific namespace, you *must* include a 'using' statement at the top of your script. For example, `using System.Collections;` or `using UnityEngine;`. Without the correct 'using' statement, the compiler won't be able to find the class.