Download

Overhead of USTRUCT vs native struct

Hello
What is the overhead of exposing a native struct to blueprint as USTRUCT, for usage in c++?
For example, if I have:


struct FMyStruct
{
    float Val;
}

TArray<FMyStruct> myStructs;
for (auto& it : myStructs)
{
    //it.Val = ...
}

would I be correct to assume that the code would perform identically whether FMyStruct was tagged USTRUCT and Val was tagged UPROPERTY or not?

I think all the USTRUCT and UPROPERTY values are going to be editor intensive but compiled down during packaging - someone do tell me if I’m wrong though.