hi,
i want to change AI target from another C# script
is there something simple like ( this.Something.target = object; ) ?
what i am trying to do is detect near player then target and attack
hi,
i want to change AI target from another C# script
is there something simple like ( this.Something.target = object; ) ?
what i am trying to do is detect near player then target and attack
Yep, you just need to set a new transform by accessing the script.
So in the other script:
ThisIsYourObject.GetComponent<AICharacterControl>().target = newTransform