BP Virtual Machine and Threads

UE4 got it own solution that video may be misleading, way it works is you got UnrealHeaderTool which parse header field and generate code based on empty macros like UCLASS, UPROPERTY etc. that generated code is called when you load the module and it creates UField objects which works as identifiers.

Then you can use TFieldIterator and standard TObjectIterator to search for those. Generated code which keeps refrence to UField of created object and you can access via StaticClass and StaticStruct so you don’t need to do iterations if you already interact with specific object and you can use later TFieldIterator and UClass or UStruct objects object to gerther analize class structure

VM is different thing but indeed it using reflection system to compile code and reference functions, reflection system also alows to create virtual field objects for VM code. I know that in UnrealScript you needed to manually declere native function with “native” option, but we have no idea how UE3 reflection system worked the same, but there lot of thigns that passed from UE3 to UE4.

1 Like