UE代码分析:GConfig的加载

The UE4 provides a mature configuration mechanism for INI files, and the engine uses ini as configuration files for both the engine and projects. This article will briefly analyze the loading of GConfig in the engine.

Read more »

UE开发的问题笔记和资料辑录

In daily development and learning, I have encountered and resolved some issues and collected some materials, which I have casually written down in notes. I have accumulated a fair amount related to UE, while other topics are mixed together and relatively chaotic. I have organized them into this article. Unlike the UE4 and VR Development Technical Notes, the content here is more focused on actual problem records and material collection within projects.

Read more »

HTC released the Vive accessory Vive Tracker to expand devices connected to SteamVR. It also features Pogo pins, allowing users to DIY special function accessories. Recently, I’ve seen some amazing creative uses of the Vive Tracker. Relevant materials and technical details are organized in this article.

Read more »

Although UE is a game engine, it is not limited to writing games—you can even use it to write Win32 GUI applications 😏. Typically, we create a UE game project using the Editor and build our own classes based on it for use in the game. However, if you don’t want to create a game project, UE also supports Standalone Applications that can construct their own programs autonomously from the main function, fully controlling which Modules to enable without relying on the engine’s own logical architecture. This can also serve as a lightweight method for learning and testing UE modules.

Note: UE does not provide a direct method to create a Standalone Application, so I wrote a tool to create a Program project: hxhb/ue4program, and implemented a demo for a standalone tool: hxhb/UE4Launcher.

Read more »

引擎源码分析:模块的加载和启动

UE is a modular architecture, where Engine/Game Project/StandaloneApplication/Plugins are all Modules (Unreal Engine API Reference lists the Modules provided by the Engine). This article analyzes how UE’s Modules are loaded and started via FModuleManager::LoadModule using the code from FModuleManager.

Read more »

UE builds projects through UBT (whether using Build in VS or Compile in the Editor, it eventually calls UBT). UBT and UHT are the cornerstones of the UE toolchain, and due to the vast amount of content, it is impossible to analyze everything at once. Let’s outline the main points now and supplement them later as time allows.

Read more »

C++多态与虚函数表

C++ is a language that supports object-oriented programming (object-oriented Programming), with inheritance and polymorphism (Polymorphic) being its most important features. There has been considerable discussion in previous articles about various aspects of C++ inheritance and class member content. This article primarily investigates one implementation method of C++ polymorphism by the compiler: virtual function tables.

The C++ standard ([IOS/IEC 14882:2014]) states:

Virtual functions support dynamic binding and object-oriented programming. A class that declares or inherits a virtual function is called a polymorphic class.

Note: The C++ standard does not specify how polymorphism is implemented, so the implementation of polymorphism by the compiler is Implementation-defined Behavior, meaning different compilers may implement polymorphism differently, and different platforms may yield different experimental results.

Read more »

Recently, I encountered a very strange error during the project packaging:

1
2
// package log
Ensure condition failed: ObservedKeyNames.Num() > 0 [File:D:\Build\++UE4+Release-4.18+Compile\Sync\Engine\Source\Runtime\AIModule\Private\BehaviorTree\Decorators\BTDecorator_BlueprintBase.cpp] [Line: 67]


I debugged the UE4 code and analyzed the cause and solution process.

Read more »

UE4 Engine defines many macros and some processing logic within the engine, such as WITH_ENGINE/WITH_EDITOR, etc. Some of these are defined by UBT through reading the configurations in *.target.cs files, and some logic is processed by reading configurations in *.Build.cs.

I have read some of the UBT code and extracted part of the configuration files (Target.cs/Build.cs) parameters and their mutual definitions with MACROs as a quick reference manual.
You can view the parameters in *.Target.cs here: UnrealBuildSystem/Targets
You can view the parameters in *.Build.cs here: UnrealBuildSystem/ModuleFiles
UE’s build system documentation: Build Tools

Read more »