当前位置:网站首页>Edit type information
Edit type information
2022-06-26 09:13:00 【LixiSchool】
https://www.behaviac.com/edit_types/
In the type information browser , Manage all created type information .
After creating the type information , We may need to continue to modify in the type information browser 、 Delete the previously created type information , Such as class and member attributes 、 Such method .
type
There are three types of :Agent、Struct and Enum, When adding a new type , You can choose accordingly , As shown in the figure below :

On the left side of the type information browser “ Type list ” Select the... You want to edit Agent Subclass , On the right side of the “ type ” In the attribute box , Relevant parameters can be modified , As shown in the figure below :

“ type ” The parameters in the box are described as follows :
- The generated code : Indicates whether the type needs to be in the lower right corner “ application ” Button , Generate source code files
- name : The name of the type , Follow C++/C# The variable naming requirements of are consistent , Illegal characters cannot be entered
- Namespace : The namespace of the type , Follow C++/C# The namespace of is consistent
- Base class : Base class of this type
- Reference type : Whether the type is a reference type , It is mainly provided for structure type . If it's a reference type , When used in the editor , Can only be used as a reference or pointer , Cannot expand configuration of its member properties .Agent Subclasses are all reference types , The structure type can be selected as reference or non reference type , Enumeration types are all non reference types
- Generation location : In general, there is no need to set , By default, the... Configured in the workspace will be used uniformly “ Code generation location ”. But if this parameter is set , Indicates that the current type will be generated in the specified directory
- Display name : Used to display the name of the type in the editor , It can be in Chinese
- describe : Used to display the description of this type in the editor , It can be in Chinese
The buttons on the upper right are described below :
- newly added : Used to add a new type
- Delete : Used to delete the selected type
- Preview prototype code : Used to preview the generated code content . If the above... Is not checked “ type ” In the box “ The generated code ” Options , You can click this button to open the prototype code file , Copy relevant content into your own code
- Set header file : In the code automatically generated by the editor , You may need to include header files in your project , Then you need to click this button , eject “C++ Export settings ” Add the required header file to the window , As shown in the figure below :

example
In the middle of the type information browser “ Instance name ” In the list , Lists the currently selected Agent All global instance names of subclasses .
On its right “ newly added ” Button to add an instance name ,“ Delete ” Button to delete the currently selected instance name , As shown in the figure below :
![]()
In the document 《 Lesson three :Agent example 》 in , There are detailed instructions for using the example .
member
In the lower part of the type information browser “ Member type ” It is divided into Property、Method and Task:
- Property: Member attribute
- Method: Member method
- Task: Mission , The interface prototype used to define the subtree call
attribute
“ Member list ” According to the... Selected above “ Member type ”, Lists all members ;“ Filter characters ” Used to enumerate all members with their own specified characters , That is, quickly retrieve the members you need , As shown in the figure below :

Select an attribute , It can be in the following “ attribute ” Box to view various parameters of this attribute :
- name : The name of the attribute , Follow C++/C# The variable naming requirements of are consistent , Illegal characters cannot be entered
- type : The type of the property . If you check the following “ Array ?”, Indicates that the type is array type
- Open : Whether the attribute is public, Follow C++/C# The concepts in are the same
- static state : Whether the attribute is static, Follow C++/C# The concepts in are the same
- read-only : Whether the attribute is read-only . If it's read-only , Then in the assignment node , Cannot be assigned as an lvalue , Only this value can be read
- local variable : Indicates whether the attribute is a local variable . If it's a local variable , Only use in the currently open behavior tree , otherwise , Is a common member property , Belongs to current Agent Subclass , Can be used for any behavior tree
- The default value is : The default initial value of this attribute , Will be automatically generated in the constructor of the type
- Display name : Used to display the name of the attribute in the editor , It can be in Chinese
- describe : Used to display the description of the attribute in the editor , It can be in Chinese
On the right side of the “ newly added ” Button to add a new attribute ,“ Delete ” The button is used to delete the selected attribute ,“ Upward ” and “ Down ” Button is used to adjust the relative position of the selected attribute .
Method
In the type information browser , take “ Member type ” Choose as “Method”, It's in “ Member list ” All member methods are listed in , As shown in the figure below :

After selecting a method , It can be in the following “ attribute ” Box to view the various parameters of the method :
- name : The name of the method , Follow C++/C# The variable naming requirements of are consistent , Illegal characters cannot be entered
- return type : The return value type of this method . If you check the following “ Array ?”, Indicates that the type is array type
- Open : Whether the method is public, Follow C++/C# The concepts in are the same
- static state : Whether the method is static, Follow C++/C# The concepts in are the same
- Display name : Used to display the name of the method in the editor , It can be in Chinese
- describe : Used to display the description of the method in the editor , It can be in Chinese
- Parameters : The parameter list of this method , You can add and delete
Mission
In the type information browser , take “ Member type ” Choose as “Task”, It's in “ Member list ” All tasks are listed in , As shown in the figure below :

The editing of tasks is the same as that of member methods , The task just defines an interface prototype , Parameter passing for events . More usage of events , Please refer to the article 《 Event handling 》.
Last , In the process of editing type information , Don't forget to click... At the bottom right “ application ” Button , Save and generate type information .
The generated code
After editing the type information , Click... At the bottom right “ Apply button ” Generate source files related to type information .
If the above Agent type “FirstAgent” Checked “ The generated code ” Options , So in it “ Generation location ” in , This type of source file will be automatically generated ( Click on the bottom left “ Open the code generation location ” Button ), As shown in the figure below :

There is also a case that Agent Type is not checked “ The generated code ” Options , Or the old version , Are written by programmers by hand Agent type . Then click on the “ application ” After button , You need to manually add the code of member properties or methods added in the type information browser on the program side .
In order to improve the efficiency and accuracy of manual coding , Click on “ Preview prototype code ” Button , As shown in the figure below :

You can see the current Agent The prototype code for the class is as follows , You can copy and paste the definitions of the required member properties or methods into your own code :

If you forget to add the corresponding member property or method on the program side , When compiling, you will also report that you cannot find these new member properties or methods added in the editor , You need to add it manually .
边栏推荐
- ThreadLocal
- Efficiency thesis Reading 1
- Yolov5进阶之一摄像头实时采集识别
- Yolov5 advanced camera real-time acquisition and recognition
- Introduction to common classes on the runtime side
- Talk about the development of type-C interface
- Nacos注册表结构和海量服务注册与并发读写原理 源码分析
- Sublime Text3 common plug-ins
- Applet realizes picture preloading (picture delayed loading)
- Phpcms V9 remove the phpsso module
猜你喜欢

Yolov5 advanced level 2 installation of labelimg

基于SSM的电脑商城

什么是乐观锁,什么是悲观锁

Yolov5 advanced camera real-time acquisition and recognition

【C】青蛙跳台阶和汉诺塔问题(递归)

yolov5进阶之零环境快速创建及测试

Tutorial 1:hello behavioc
![[program compilation and pretreatment]](/img/c9/45353cf6578628ad44f149350873f5.png)
[program compilation and pretreatment]
![[300+ continuous sharing of selected interview questions from large manufacturers] column on interview questions of big data operation and maintenance (I)](/img/cf/44b3983dd5d5f7b92d90d918215908.png)
[300+ continuous sharing of selected interview questions from large manufacturers] column on interview questions of big data operation and maintenance (I)

In depth study paper reading target detection (VII) Chinese version: yolov4 optimal speed and accuracy of object detection
随机推荐
Basic concept and advanced level of behavior tree
Self taught programming series - 4 numpy arrays
运行时端的执行流程
Talk about the development of type-C interface
Docker install redis
【300+精选大厂面试题持续分享】大数据运维尖刀面试题专栏(一)
Computer mall based on SSM
How to use the least money to quickly open the Taobao traffic portal?
Chargement à chaud du fichier XML de l'arbre de comportement
[qnx hypervisor 2.2 user manual]12.1 terminology (I)
Section IV HQL execution process
How to set the shelves and windows, and what to pay attention to in the optimization process
Phpcms applet plug-in tutorial website officially launched
行为树 文件说明
Some commands for remote work
Tensor
[program compilation and pretreatment]
ThreadLocal
phpcms v9去掉phpsso模块
编辑类型信息