So i’m using the building AIPath to move to a target and it works just fine if i set the target manually through the Unity interface. However, i’m struggling with how to set the target via code.
What i have so far is when i click the left mouse button a function runs that sets the target for my Hero object. Using this target variable i can shoot at it. But i can’t figure out how to path to it also.
Any help is appreciated.