• 注册
欢迎加入behaviac Q&A网站。behaviac是腾讯开源组件https://github.com/TencentOpen/behaviac 官方网站:http://www.behaviac.com/,提供各种文档和教程及手册 为了您及时的获得您最新问题的评论或者回答,请提供并验证您的邮箱

Task 中使用LogMessage方法

0 喜欢 0 不喜欢
35 浏览

Task 中使用LogMessage方法会报错

imageimage

 

报错调用栈

NullReferenceException: Object reference not set to an instance of an object
behaviac.CAgentStaticMethodVoid`1[System.String].Run (behaviac.Agent self) (at Assets/Scripts/Behaviac/runtime/Base/Member.cs:3068)
behaviac.Action.Execute (behaviac.Agent pAgent, EBTStatus childStatus) (at Assets/Scripts/Behaviac/runtime/BehaviorTree/Nodes/Actions/Action.cs:86)
behaviac.Action+ActionTask.update (behaviac.Agent pAgent, EBTStatus childStatus) (at Assets/Scripts/Behaviac/runtime/BehaviorTree/Nodes/Actions/Action.cs:156)
behaviac.BehaviorTask.update_current (behaviac.Agent pAgent, EBTStatus childStatus) (at Assets/Scripts/Behaviac/runtime/BehaviorTree/BehaviorTree_task.cs:471)
behaviac.BehaviorTask.exec (behaviac.Agent pAgent, EBTStatus childStatus) (at Assets/Scripts/Behaviac/runtime/BehaviorTree/BehaviorTree_task.cs:196)
behaviac.BehaviorTask.exec (behaviac.Agent pAgent) (at Assets/Scripts/Behaviac/runtime/BehaviorTree/BehaviorTree_task.cs:148)
behaviac.TaskTask.update (behaviac.Agent pAgent, EBTStatus childStatus) (at Assets/Scripts/Behaviac/runtime/HTN/Task.cs:156)
behaviac.BranchTask.update_current (behaviac.Agent pAgent, EBTStatus childStatus) (at Assets/Scripts/Behaviac/runtime/BehaviorTree/BehaviorTree_task.cs:930)
behaviac.BehaviorTask.exec (behaviac.Agent pAgent, EBTStatus childStatus) (at Assets/Scripts/Behaviac/runtime/BehaviorTree/BehaviorTree_task.cs:196)
behaviac.SingeChildTask.update (behaviac.Agent pAgent, EBTStatus childStatus) (at Assets/Scripts/Behaviac/runtime/BehaviorTree/BehaviorTree_task.cs:1228)
behaviac.BehaviorTreeTask.update (behaviac.Agent pAgent, EBTStatus childStatus) (at Assets/Scripts/Behaviac/runtime/BehaviorTree/BehaviorTree_task.cs:1485)
behaviac.BranchTask.update_current (behaviac.Agent pAgent, EBTStatus childStatus) (at Assets/Scripts/Behaviac/runtime/BehaviorTree/BehaviorTree_task.cs:930)
behaviac.BehaviorTreeTask.update_current (behaviac.Agent pAgent, EBTStatus childStatus) (at Assets/Scripts/Behaviac/runtime/BehaviorTree/BehaviorTree_task.cs:1467)
behaviac.BehaviorTask.exec (behaviac.Agent pAgent, EBTStatus childStatus) (at Assets/Scripts/Behaviac/runtime/BehaviorTree/BehaviorTree_task.cs:196)
behaviac.BehaviorTask.exec (behaviac.Agent pAgent) (at Assets/Scripts/Behaviac/runtime/BehaviorTree/BehaviorTree_task.cs:148)
behaviac.Agent.btexec_ () (at Assets/Scripts/Behaviac/runtime/Agent/Agent.cs:1444)
behaviac.Agent.btexec () (at Assets/Scripts/Behaviac/runtime/Agent/Agent.cs:1536)
TaskLogMessage.LogMessage.Update () (at Assets/Scripts/LogMessage/LogMessage.cs:30)

最新提问 9月 18, 2016 用户: qq_57c56d61cf82e (390 分)
修改于 9月 19, 2016 用户:jonygli

1个回答

0 喜欢 0 不喜欢

可以参考:http://www.behaviac.com/language/zh/task/

任务是用来定义一个‘接口’。只能作为某个子树的根节点。

另外,你的这个有任务的子树是怎么被引用的?

麻烦把你的workspace发给群主?

还有你的版本号是什么?

最新回答 9月 19, 2016 用户: jonygli (57,510 分)
...