- Home /
error: `AI' does not exist in the namespace`UnityEngine'
I am getting an error regarding a script in Unity 5.4.0b24.
Assets/Standard Assets/Character Controllers/Sources/Scripts/AICharacterControl.cs(10,28): error CS0234: The type or namespace name AI' does not exist in the namespace `UnityEngine'. Are you missing an assembly reference?
removing this script from my project causes playmaker to give 72 errors like "pathfinding" stuff, so I can't just delete this script.
any idea how to correct this error?
If you open project in older version after opening it in newer you not avoid problems, so before try new beta version make backup of project. Not sure how fix error.
Answer by Wiseman17 · Dec 26, 2016 at 06:25 AM
I guess it's a mixup during Unity changing versions or between Pro and Personal versions.
Had the same problem. In my case Unity could not find
UnityEngine.AI.NavMeshAgent
Solved by pointing all the references to
UnityEngine.NavMeshAgent
instead.
Answer by westingtyler · Oct 10, 2016 at 07:12 AM
I eliminated the editor error by removing the AI script, removing the Playmaker Pathfinding folder whose actions then freaked out, removing the Playmaker script NavMeshAgentAnimatorSynchronizer.cs that also freaked out, then removing the folder for the Energy Bar Toolkit that also freaked out.
Now everything seems to work fine, but I might have deleted something I will later need or that could pop up at any time. If anyone has an insight into how to add "AI" to the namespace 'UnityEngine' that would be the real solution.
Answer by moyrac · Feb 01, 2018 at 04:07 PM
using System; using UnityEngine;
this works for me in Unity 5.3
Your answer
Follow this Question
Related Questions
Performance implications of namespaces in Unity. 2 Answers
Maya Import Strip Namespaces 6 Answers
namespace UnityEditor could not be found 0 Answers