Files
.obsidian
.vs
00-MOC
01-Diary
02-Note
03-UnrealEngine
Animation
Editor
Gameplay
AI
Animation
Code
Debug
GAS
Gameplay
Http
Lyra
Mass
Online
Other
PuerTS
UObject
UnrealSpecifiers
Flags
Meta
Specifier
UCLASS
Blueprint
Category
Config
Development
Instance
Scene
Serialization
TypePicker
UHT
MinimalAPI
CustomConstructor.md
CustomFieldNotify.md
CustomThunkTemplates.md
Interface.md
Intrinsic.md
NoExport.md
UCLASS().md
不写UCLASS().md
UENUM
UFUNCTION
UINTERFACE
UPARAM
UPROPERTY
USTRUCT
UCLASS.md
UENUM.md
UFUNCTION.md
UINTERFACE.md
UPARAM.md
UPROPERTY.md
USTRUCT.md
UnrealSpecifiers.md
Ue4 c++ UProperty反射 PostEditChangeProperty.md
Ue4Object生命周期.jpg
大钊提供的一种获取UE Private函数的方法.md
LevelScene
Math
Mobile
Physical
Plugins
Rendering
Sequence
UI
VirtualProduction
VisualEffect
卡通渲染相关资料
性能优化
流程管理与部署
.keep
03-UnrealEngine.md
04-ComputerGraphics
05-SDHGame
06-DCC
07-Other
08-Assets
09-Templates
.gitattributes
.gitignore
.gitmodules
LICENSE
BlueRoseNote/03-UnrealEngine/Gameplay/UObject/UnrealSpecifiers/Specifier/UCLASS/UHT/CustomConstructor.md

14 lines
809 B
Markdown
Raw Normal View History

2024-10-12 17:19:46 +08:00
# CustomConstructor
- **功能描述:** 阻止构造函数声明自动生成。
- **引擎模块:** UHT
- **元数据类型:** bool
- **作用机制:** 在ClassFlags中添加[CLASS_CustomConstructor](../../../Flags/EClassFlags/CLASS_CustomConstructor.md)
UHT不会生成 NO_API UMyClass_ModuleAPI(const FObjectInitializer& ObjectInitializer = FObjectInitializer::Get());的默认构造函数。但是这个一般都是配合GENERATED_UCLASS_BODY使用的因为GENERATED_BODY会自动生成默认构造函数。一般在自己需要自定义这个函数的时候使用。但其实用GENERATED_BODY也行
当前已经弃用:
```cpp
CLASS_CustomConstructor UE_DEPRECATED(5.1, "CLASS_CustomConstructor should no longer be used. It is no longer being set by engine code.") = 0x00008000u,
```