Any good articles about Unreal Engine Internals (Serialization, object flags, actor component instance data)

There are quite a few not well documented features of unreal.

I’m looking at the Child Actor Component again and there is a lot of really confusing stuff going on in there that I’m trying to wrap my head around. I’m trying to make a component similar to Child Actor component that lets me customize properties on an actor before I spawn it at runtime. I used to just let you specify a class and a map of user data which is the quickest and dirtiest way to do such a thing, but I want to actually let properties and other things be set like the template actor in the child actor component. I luckily can use Instanced to specify properties in UObjects but that doesn’t seem to work for Actors.

Some examples of confusion are:
void UChildActorComponent::Serialize(FArchive& Ar)

Not super sure how serializing works. There are vague articles but nothing concrete in the unreal engine docs. A lot of random stuff is going on in ChildActorComponent that confuses me.

There’s something called FComponentInstanceDataCache which I’m not really sure what it’s doing.

There are all sorts of flags like RF_TextExportTransient | RF_NonPIEDuplicateTransient that I’d never think to worry about if I was writing something from the ground up to spawn an actor.

There is something called an Archetype. I’m not sure what the difference is between Archetype and Class Default Object. I completely understand Class Default Objects and that they have a limitation of things only being set up from the C++ side. The blueprint side doesn’t exist in CDOs. There are SCSNodes or something which I still need to wrap my head around as a template for how to spawn Blueprint things but you can’t get at blueprint spawned components otherwise.

Things like this would be great if there was an explanation. It seems like the docs are mostly geared towards some high level concepts that only artists would be interested in, but hardcore C++ programmers have to debug through the source and figure it out manually? I’ve figured out a lot over the years this way but I really wish there were clear explanations for low level concepts like this.

The thing is, all I’m trying to do is make an easy way for someone to customize properties on an actor when it would eventually spawn at runtime, and that’s proving incredibly complicated. I’d love to specify some options on magazines attached to some weapons, or customize properties on inventory items that spawn inside a treasure chest, etc… Right now I do it with TMaps of Fstring to Fstring which is cumbersome.

Some of the flags are related to duplicating objects or enabling undo when they are spawned. For example, if you duplicate an actor in the editor, and it has components, you don’t want the duplicated actor to hold references to the original components, but rather to the duplicated components.

Child Actor components are quite limited in what they can do, there was one stream on it but IIRC they had severe limitations, such they could not be edited at per-instances basis. Not sure if it has changed since last time I tried them.

Use SpawnActorDeferred → Set your variables → FinishSpawningActor when spawning an actor at runtime. Blueprint equivalent is ExposeOnSpawn in variables.