当前位置:网站首页>Execution process at runtime
Execution process at runtime
2022-06-26 09:13:00 【LixiSchool】
On the run-time side ( Let's say C++ Version to illustrate ,C# Version is basically similar ), The entire build can be updated through Workspace::Update() Function to execute , This function mainly includes two functions :
- call DebugUpdate() Function to update some functions related to continuous and hot loading .
- according to m_bExecAgents To determine whether it is necessary to perform all Agent Example of btexec() function , It can be through the interface Workspace::SetIsExecAgents(bool bExecAgents) Yes m_bExecAgents Set it up .
The specific execution logic is shown in the following code :
void Workspace::DebugUpdate()
{
this->LogFrames();
this->HandleRequests();
if (this->GetAutoHotReload())
{
this->HotReload();
}
}
void Workspace::Update()
{
this->DebugUpdate();
if (this->m_bExecAgents)
{
int contextId = -1;
Context::execAgents(contextId);
}
}about C++ edition , The execution of the behavior tree can call behaviac::Workspace::GetInstance()->Update() To carry out all Agent Instance behavior tree , You can also call Agent The interface of btexec() To execute the behavior tree of a single instance .
among ,Workspace::Update() Will traverse all Agent Instance and execute btexec(), But in my own game , It may be necessary to do some... In one frame Agent Multiple calls btexec(), And others Agent Just call... Once , In this case, you need to call Agent::btexec(), Instead of uniform calls Workspace::Update().
Workspace::Update() Calling Agent::btexec() Before , Will check the Agent::IsActive() Is it true, If false, that btexec() It won't be called .
Besides , To support continuous and hot loading , Please make sure that the update function of your game calls DebugUpdate() function . If you have already called behaviac::Workspace::GetInstance()->Update(), Then there is no need to call DebugUpdate().
The above example code is C++, But for the C#, They all have the same name .
Particular attention : about C# edition ,behaviac.Workspace.IsExecAgents Default to false.
- If you will behaviac.Workspace.IsExecAgents Set to true, Use behaviac.Workspace.Instance.Update() Centralized update ,Agent You don't need to call... For your own updates btexec() 了 .
- If you will behaviac.Workspace.IsExecAgents Set to false, Do not use behaviac.Workspace.Instance.Update() Centralized update ,Agent For your own updates, you need to call btexec() 了 .
边栏推荐
- 《一周搞定数电》——组合逻辑电路
- 上下架和橱窗推荐如何设置,优化过程需要注意的地方
- Implementation code of interceptor and filter
- 基于SSM的毕业论文管理系统
- Efficiency thesis Reading 1
- Particles and sound effect system in games104 music 12 game engine
- Router bridging settings
- 微信小程序如何转换成百度小程序
- 【微积分】拉格朗日乘子法
- Self taught neural network series - 9 convolutional neural network CNN
猜你喜欢

报错ImportError: numpy.core.multiarray failed to import

Games104 Lecture 12 游戏引擎中的粒子和声效系统

行为树的基本概念及进阶

简析ROS计算图级

教程1:Hello Behaviac

Application of hidden list menu and window transformation in selenium

phpcms v9去掉phpsso模块

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

dedecms小程序插件正式上线,一键安装无需任何php或sql基础

Runtimeerror: object has no attribute NMS error record when using detectron2
随机推荐
《一周搞定模电》—55定时器
Programming training 7- date conversion problem
Data warehouse (1) what is data warehouse and what are the characteristics of data warehouse
Principe et application du micro - ordinateur à puce unique - Aperçu
攔截器與過濾器的實現代碼
Autoregressive model of Lantern Festival
Yolov5进阶之五GPU环境搭建
Yolov5进阶之二安装labelImg
How to set the shelves and windows, and what to pay attention to in the optimization process
phpcms v9去掉phpsso模块
Phpcms applet interface new universal interface get_ diy. php
Phpcms V9 background article list adds one click push to Baidu function
行為樹XML文件 熱加載
小程序实现图片预加载(图片延迟加载)
Behavior tree XML file hot load
How to use the least money to quickly open the Taobao traffic portal?
In depth study paper reading target detection (VII) Chinese version: yolov4 optimal speed and accuracy of object detection
Section IV HQL execution process
Yolov5 advanced III training environment
Upgrade phpcms applet plug-in API interface to 4.3 (add batch acquisition interface, search interface, etc.)