AI设计之Behavior Designer

本文记录了使用Behavior Designer设计AI时的经验,包括如何在Variables选项卡添加和关联变量,将行为树作为子节点的方法,以及行为树中的事件驱动和中断机制。详细介绍了条件中断在Sequence任务中的工作原理。
摘要由CSDN通过智能技术生成

最近使用Behavior Designer设计AI。

遇到的一些情况记录备用:

--------------------------------------------------------

1 通常行为树使用黑板Black Board记录数据。Behavior Designer可以直接在Variables选项卡里添加变量。


2 Behavior Designer的子节点定义好SharedInt变量,然后可以通过该节点的Inspector选项卡,关联到1中你定义的变量。

只需要点击变量后面的“小圆点”,暂且称之为“关联按钮”。


3 点击“关联按钮”关联变量时,死活找不到在1中定义的变量。

问题:肯定是Variables里的变量类型没有设置正确。怎么设置变量类型,看4.


4 在Variables选项卡中添加一个变量后,仔细一点会发现并不是你选择的那个类型。点一下你刚刚定义好的那个变量,你就可以改变它的类型了。。。



---------------------------------------------------------

将一颗行为树作为另一颗行为树的子节点:

1 添加Behavior Tree Reference节点。

Add Task -> Actions -> Behavior Tree Reference 。


2 选中该节点,切换到“Inspector”选项卡,设置“External Behaviors”的个数,比如1;然后就可以将你之前导出的行为树拖到该节点了。



---

This extension requires one license per seat Requires Unity 4.6.0 or higher. Behavior trees are used by AAA studios to create a lifelike AI. With Behavior Designer, you can bring the power of behaviour trees to Unity! Behavior Designer is a behaviour tree implementation designed for everyone - programmers, artists, designers. Behavior Designer offers an intuitive visual editor with a powerful API allowing you to easily create new tasks. It also includes hundreds of tasks, PlayMaker integration, and extensive third party integration making it possible to create complex AIs without having to write a single line of code! Behavior Designer was designed from the ground up to be as efficient as possible with zero allocations after initialization. As a result, it runs great on all platforms including mobile. Behavior Designer is dedicated to behavior trees, which means that each update will be a better behavior tree implementation. Features: - An intuitive visual editor - A powerful API - Visual runtime debugger - Variables to communicate between tasks - Conditional Aborts - Built in event system - Unity 5 multiplayer support - Use existing code with reflection tasks - Hundreds of tasks - Evaluate tasks using Utility Theory - Realtime error detection - Binary or JSON serialization - Data-oriented design - Zero runtime allocations after startup - Object drawers (property drawers) - Includes runtime source code - Extensive documentation and videos - Sample projects available online - And more Addon Packs: - Formations Pack - Movement Pack - Tactical Pack Complete Projects: - Deathmatch AI Kit Third Party Integrations: - 2D Toolkit - A* Pathfinding Project (Movement Pack) - Adventure Creator - Anti-Cheat Toolkit - Apex Path (Movement Pack) - Blox - Camera Path Animator - Chronos - Cinema Director - Control Freak - Core GameKit - Curvy - Dialogue System - DOTween - Final IK - Glow Effect - ICode - Inventory Pro - LeanTween - Love/Hate - Master Audio - NGUI - Particl
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值