UCLASS(config=Game,BlueprintType,Blueprintable)classCHELSEALEARN_APIUObjectConfig:publicUObject{GENERATED_BODY()public:UObjectConfig();virtual~UObjectConfig()override;UPROPERTY(BlueprintReadOnly,config)int32ConfigValue=0;UPROPERTY(BlueprintReadOnly)int32Value=10;};//DefaultGame.ini[/Script/ChelseaLearn....
常见的 ConfigName 值是 “Engine”、”Editor”、”Input” 和“Game” Const该类中的所有属性和函数都是const的,并以const的形式导出。该说明符由子类继承 ConversionRootRoot转换将一个子类限制为仅能够转换为第一个Root类的子类,并上升到层次结构 CustomConstructor阻止自动生成构造函数声明 DefaultToInstanced这个...
GetConfigName () Translates the hardcoded script config names (engine, editor, input and game) to their global pendants and otherwise uses config(myini) name to look for a game specific implementation and creates one based on the default if it doesn't exist yet. const ICppClassTypeInfo *...
常见的 ConfigName 值是 “Engine”、”Editor”、”Input” 和“Game” Const 该类中的所有属性和函数都是const的,并以const的形式导出。该说明符由子类继承 ConversionRoot Root转换将一个子类限制为仅能够转换为第一个Root类的子类,并上升到层次结构 CustomConstructor 阻止自动生成构造函数声明 DefaultToInstanced...
/// Same as above but load config from base class, not subclass. GlobalConfig, /// Property should be loaded as localizable text. Implies ReadOnly. Localized, /// Property is transient: shouldn't be saved, zero-filled at load time. ...
使用NewObject 创建 Native 类对象,默认情况下不会使用 CDO 给创建的对象赋默认值(设置 bCopyTransientsFromClassDefaults 为真 ,或属性标记了 config 则会使用 CDO 给创建的对象赋默认值) Native 类的 CDO 对象的生命周期是在程序启动加载当前类所在默认以后生成,程序结束以后销毁。它保存在非 GC 扫描的序列内,因...
UCLASS(config = Game, notplaceable, BlueprintType, Blueprintable, Transient, hideCategories = (Info, Rendering, MovementReplication, Replication, Actor), meta = (ShortTooltip = "Game Mode Base defines the game being played, its rules, scoring, and other facets of the game type."))class ENGINE...
(AMyActor),alignof(AMyActor),StaticClassFlags,StaticClassCastFlags(),StaticConfigName(),InternalConstructor<AMyActor>,InternalVTableHelperCtorCaller<AMyActor>,UOBJECT_CPPCLASS_STATICFUNCTIONS_FORCLASS(AMyActor),&Super::StaticClass,&WithinClass::StaticClass);}returnZ_Registration_Info_UClass_AMyActor....
如果存在任何使用config或globalconfig说明符声明的类属性,此说明符将使这些属性存储在指定的配置文件中。此说明符会传播到所有子类并且无法使此说明符无效,但是子类可通过重新声明config说明符并提供不同的ConfigName来更改配置文件。常见的ConfigName值是“Engine”、“Editor”、“Input”和“Game”。
根据宏定义GENERATED_BODY我本地展开:UACode_Source_UAGame_Public_MyObject_h_8_GENERATED_BODY 展开后的宏定义中包含了文件信息和行号信息,保证唯一性,因为一个文件中可能有多个GENERATED_BODY标记信息。 编译前UHT会为我们生成两个文件MyObject.generated.h,MyObject.gen.cpp,我们可以在MyObejct.generated.h中找到...