【UE4源代码观察】观察FEngineLoop中各函数的调用顺序

2024-09-06 23:58

本文主要是介绍【UE4源代码观察】观察FEngineLoop中各函数的调用顺序,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

当启动编辑器时,Launch模块是启动模块,在Windows平台中 LaunchWindows.cpp 的 WinMain函数是入口,而 FEngineLoop 管理了程序的初始化与主循环。他的成员函数如下:

public:/*** Pre-Initialize the main loop, and generates the commandline from standard ArgC/ArgV from main().** @param ArgC The number of strings in ArgV.* @param ArgV The command line parameters (ArgV[0] is expected to be the executable name).* @param AdditionalCommandLine Optional string to append to the command line (after ArgV is put together).* @return Returns the error level, 0 if successful and > 0 if there were errors.*/ int32 PreInit(int32 ArgC, TCHAR* ArgV[], const TCHAR* AdditionalCommandline = nullptr);/*** Pre-Initialize the main loop - parse command line, sets up GIsEditor, etc.** @param CmdLine The command line.* @return The error level; 0 if successful, > 0 if there were errors.*/ int32 PreInit(const TCHAR* CmdLine);/** First part of PreInit. */int32 PreInitPreStartupScreen(const TCHAR* CmdLine);/** Second part of PreInit. */int32 PreInitPostStartupScreen(const TCHAR* CmdLine);/** Load all modules needed before Init. */ void LoadPreInitModules();/** Load core modules. */bool LoadCoreModules();#if WITH_ENGINE/** Load all core modules needed at startup time. */bool LoadStartupCoreModules();/** Load all modules needed at startup time. */bool LoadStartupModules();/*** Initialize the main loop (the rest of the initialization).** @return The error level; 0 if successful, > 0 if there were errors.*/ virtual int32 Init() override;/** Initialize the timing options from the command line. */ void InitTime();/** Performs shut down. */void Exit();/** Whether the engine should operate in an idle mode that uses no CPU or GPU time. */bool ShouldUseIdleMode() const;/** Advances the main loop. */virtual void Tick() override;/** Removes references to any objects pending cleanup by deleting them. */virtual void ClearPendingCleanupObjects() override;#endif // WITH_ENGINE/** RHI post-init initialization */static void PostInitRHI();/** Pre-init HMD device (if necessary). */static void PreInitHMDDevice();public:/** Initializes the application. */static bool AppInit();/*** Prepares the application for shutdown.** This function is called from within guarded exit code, only during non-error exits.*/static void AppPreExit();/*** Shuts down the application.** This function called outside guarded exit code, during all exits (including error exits).*/static void AppExit();private:/** Utility function that processes Slate operations. */void ProcessLocalPlayerSlateOperations() const;

我想搞清这些函数的调用次序,于是插入断点观察堆栈,画出了下面的顺序图:
在这里插入图片描述

这篇关于【UE4源代码观察】观察FEngineLoop中各函数的调用顺序的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/1143487

相关文章

Python函数作用域示例详解

《Python函数作用域示例详解》本文介绍了Python中的LEGB作用域规则,详细解析了变量查找的四个层级,通过具体代码示例,展示了各层级的变量访问规则和特性,对python函数作用域相关知识感兴趣... 目录一、LEGB 规则二、作用域实例2.1 局部作用域(Local)2.2 闭包作用域(Enclos

MySQL count()聚合函数详解

《MySQLcount()聚合函数详解》MySQL中的COUNT()函数,它是SQL中最常用的聚合函数之一,用于计算表中符合特定条件的行数,本文给大家介绍MySQLcount()聚合函数,感兴趣的朋... 目录核心功能语法形式重要特性与行为如何选择使用哪种形式?总结深入剖析一下 mysql 中的 COUNT

Java中调用数据库存储过程的示例代码

《Java中调用数据库存储过程的示例代码》本文介绍Java通过JDBC调用数据库存储过程的方法,涵盖参数类型、执行步骤及数据库差异,需注意异常处理与资源管理,以优化性能并实现复杂业务逻辑,感兴趣的朋友... 目录一、存储过程概述二、Java调用存储过程的基本javascript步骤三、Java调用存储过程示

MySQL 中 ROW_NUMBER() 函数最佳实践

《MySQL中ROW_NUMBER()函数最佳实践》MySQL中ROW_NUMBER()函数,作为窗口函数为每行分配唯一连续序号,区别于RANK()和DENSE_RANK(),特别适合分页、去重... 目录mysql 中 ROW_NUMBER() 函数详解一、基础语法二、核心特点三、典型应用场景1. 数据分

MySQL数据库的内嵌函数和联合查询实例代码

《MySQL数据库的内嵌函数和联合查询实例代码》联合查询是一种将多个查询结果组合在一起的方法,通常使用UNION、UNIONALL、INTERSECT和EXCEPT关键字,下面:本文主要介绍MyS... 目录一.数据库的内嵌函数1.1聚合函数COUNT([DISTINCT] expr)SUM([DISTIN

Python中Tensorflow无法调用GPU问题的解决方法

《Python中Tensorflow无法调用GPU问题的解决方法》文章详解如何解决TensorFlow在Windows无法识别GPU的问题,需降级至2.10版本,安装匹配CUDA11.2和cuDNN... 当用以下代码查看GPU数量时,gpuspython返回的是一个空列表,说明tensorflow没有找到

Python get()函数用法案例详解

《Pythonget()函数用法案例详解》在Python中,get()是字典(dict)类型的内置方法,用于安全地获取字典中指定键对应的值,它的核心作用是避免因访问不存在的键而引发KeyError错... 目录简介基本语法一、用法二、案例:安全访问未知键三、案例:配置参数默认值简介python是一种高级编

python 常见数学公式函数使用详解(最新推荐)

《python常见数学公式函数使用详解(最新推荐)》文章介绍了Python的数学计算工具,涵盖内置函数、math/cmath标准库及numpy/scipy/sympy第三方库,支持从基础算术到复杂数... 目录python 数学公式与函数大全1. 基本数学运算1.1 算术运算1.2 分数与小数2. 数学函数

python如何调用java的jar包

《python如何调用java的jar包》这篇文章主要为大家详细介绍了python如何调用java的jar包,文中的示例代码简洁易懂,具有一定的借鉴价值,有需要的小伙伴可以参考一下... 目录一、安装包二、使用步骤三、代码演示四、自己写一个jar包五、打包步骤六、方法补充一、安装包pip3 install

Spring如何使用注解@DependsOn控制Bean加载顺序

《Spring如何使用注解@DependsOn控制Bean加载顺序》:本文主要介绍Spring如何使用注解@DependsOn控制Bean加载顺序,具有很好的参考价值,希望对大家有所帮助,如有错误... 目录1.javascript 前言2. 代码实现总结1. 前言默认情况下,Spring加载Bean的顺