ClassPrivate
Is theUClass
of the object instance. The thing you get back when you callGetClass()
.- If a object was loaded from “a loader” (
FAsyncPackage
orLoadPackageInternal
) it will have theRF_WasLoaded
flag. This can be very useful to use on actors to know if they got loaded from disk or spawned at runtime. - UObject Construction & Post Initalization
Reflection
Since 5.5 TObjectPtr<>
is mandatory for UObject
variables (only for members of classes and structs). You still need to mark the variable with UPROPERTY()
or the UObject
ref will never be cleared.
See
There is also AddReferencedObjects
, for example this is used in AActor to add all owned components.
The GC will call this as much as it needs (TStrongObjectPtr
would be better performance wise in some cases).
To use
TStrongObjectPtr
you must include the type
Virtual details
-
PostTransacted
is called when you move/edit anything in a BP -
When you compile a BP,
PostInitProperties
,PostEditChangeProperty
andPostCDOContruct
are called. -
When you edit a property
PostEditChangeProperty
is called (Doesn’t work for Transforms) -
PostCDOContruct
always has its World null.