was right.
The first two examples use:
FObjectInitializer::CreateDefaultSubobject(UObject * Outer, FName SubobjectName, bool bTransient = false)
Creating a subobject, “this” is being used to set the Outer object. You can read the first one like this:
Create a PointLightComponent subobject, make it’s owner this LightSwitchCodeOnly (i.e. this object), set its name as “PointLight1”
The 2nd two examples use:
AddDynamic(UserObject, FuncName)
Assigning a delegate function to be run when Sphere1 is overlapped, “this” is being used to set the object to run the delegate on. You can read the first like this:
When Sphere1 is overlapped call the “OnOverlap” function on this LightSwitchCodeOnly (i.e. this object)