Sorry if the title is vague, I’m not completely sure how to describe this issue.
I’ve got a basic AI script where I’ll assign an object for the enemy to chase. The problem is, when I turn the enemy into a prefab, the target assignment becomes blank and I cannot alter it while it’s a prefab. I’ve tried to assign the object within the code itself but I’m not completely sure how to do so (I’ve tried a number of things but nothing has panned out).
Any tips on how to fix the first problem, or just how to assign a target within code would be very helpful. C# would be the preferred language for code.