|
Post by krischan on Oct 17, 2021 19:04:51 GMT
Hi!
I get this error message: UnassignedReferenceException: The variable _capsuleCollider of vControlAI has not been assigned.
But I have the capusle collider, a v control ai script, a vfsm behaviour controller and Animator, Rigidbody, Hit Damage Particle on my Monster (Generic Ai).
And I load this prefab in runtime in scene. So I turned off the v Control AI and the FSM Behaviour in the Prefab. Calculate the navmesh, add the waypoint area and then I turn both on. This process works for the humanoid enemys perfect.
But now I want to create a generic AI which patrol and follow / shoot when Player come to close.
My Problem is not only the missing capusleCollider bug. The Start routine from vAIMotor is not called. When I add an if into the vAIMotor for the _capsuleCollider to set them, the next part is missing: The rigidbody is then not assigned.
And to call the Start function by scriptcode addionally seems not a good practice.
So is there anyone with same problems? Or a hint how to change my approach?
Kind regards, Krischan
|
|