【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

相关文章

在C#中调用Python代码的两种实现方式

《在C#中调用Python代码的两种实现方式》:本文主要介绍在C#中调用Python代码的两种实现方式,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教... 目录C#调用python代码的方式1. 使用 Python.NET2. 使用外部进程调用 Python 脚本总结C#调

Android Kotlin 高阶函数详解及其在协程中的应用小结

《AndroidKotlin高阶函数详解及其在协程中的应用小结》高阶函数是Kotlin中的一个重要特性,它能够将函数作为一等公民(First-ClassCitizen),使得代码更加简洁、灵活和可... 目录1. 引言2. 什么是高阶函数?3. 高阶函数的基础用法3.1 传递函数作为参数3.2 Lambda

SpringCloud之LoadBalancer负载均衡服务调用过程

《SpringCloud之LoadBalancer负载均衡服务调用过程》:本文主要介绍SpringCloud之LoadBalancer负载均衡服务调用过程,具有很好的参考价值,希望对大家有所帮助,... 目录前言一、LoadBalancer是什么?二、使用步骤1、启动consul2、客户端加入依赖3、以服务

C++中::SHCreateDirectoryEx函数使用方法

《C++中::SHCreateDirectoryEx函数使用方法》::SHCreateDirectoryEx用于创建多级目录,类似于mkdir-p命令,本文主要介绍了C++中::SHCreateDir... 目录1. 函数原型与依赖项2. 基本使用示例示例 1:创建单层目录示例 2:创建多级目录3. 关键注

C++中函数模板与类模板的简单使用及区别介绍

《C++中函数模板与类模板的简单使用及区别介绍》这篇文章介绍了C++中的模板机制,包括函数模板和类模板的概念、语法和实际应用,函数模板通过类型参数实现泛型操作,而类模板允许创建可处理多种数据类型的类,... 目录一、函数模板定义语法真实示例二、类模板三、关键区别四、注意事项 ‌在C++中,模板是实现泛型编程

kotlin的函数forEach示例详解

《kotlin的函数forEach示例详解》在Kotlin中,forEach是一个高阶函数,用于遍历集合中的每个元素并对其执行指定的操作,它的核心特点是简洁、函数式,适用于需要遍历集合且无需返回值的场... 目录一、基本用法1️⃣ 遍历集合2️⃣ 遍历数组3️⃣ 遍历 Map二、与 for 循环的区别三、高

Vue 调用摄像头扫描条码功能实现代码

《Vue调用摄像头扫描条码功能实现代码》本文介绍了如何使用Vue.js和jsQR库来实现调用摄像头并扫描条码的功能,通过安装依赖、获取摄像头视频流、解析条码等步骤,实现了从开始扫描到停止扫描的完整流... 目录实现步骤:代码实现1. 安装依赖2. vue 页面代码功能说明注意事项以下是一个基于 Vue.js

C语言字符函数和字符串函数示例详解

《C语言字符函数和字符串函数示例详解》本文详细介绍了C语言中字符分类函数、字符转换函数及字符串操作函数的使用方法,并通过示例代码展示了如何实现这些功能,通过这些内容,读者可以深入理解并掌握C语言中的字... 目录一、字符分类函数二、字符转换函数三、strlen的使用和模拟实现3.1strlen函数3.2st

讯飞webapi语音识别接口调用示例代码(python)

《讯飞webapi语音识别接口调用示例代码(python)》:本文主要介绍如何使用Python3调用讯飞WebAPI语音识别接口,重点解决了在处理语音识别结果时判断是否为最后一帧的问题,通过运行代... 目录前言一、环境二、引入库三、代码实例四、运行结果五、总结前言基于python3 讯飞webAPI语音

MySQL中COALESCE函数示例详解

《MySQL中COALESCE函数示例详解》COALESCE是一个功能强大且常用的SQL函数,主要用来处理NULL值和实现灵活的值选择策略,能够使查询逻辑更清晰、简洁,:本文主要介绍MySQL中C... 目录语法示例1. 替换 NULL 值2. 用于字段默认值3. 多列优先级4. 结合聚合函数注意事项总结C