I've been trying to create a standard prefab for all characters to use and then initiate that prefab at runtime and modify the attached scripts to make it either the main character controller or an ai character (in the future it could also be a network character). I must be missing something cause when I set up the AI character I get navmesh errors even though it has a navmeshagent attached and a behavior tree.
Is there any documentation on how to attache/activate the required scripts at runtime and set them up to turn a main character into an ai character or vice versa? I understand how to do it if I drag the prefab in and set it up manually, but I want something that can be done dynamically when the game starts.
Is this possible and is it documented anywhere?
Thanks
Is there any documentation on how to attache/activate the required scripts at runtime and set them up to turn a main character into an ai character or vice versa? I understand how to do it if I drag the prefab in and set it up manually, but I want something that can be done dynamically when the game starts.
Is this possible and is it documented anywhere?
Thanks