I can’t figure out what’s wrong, when I print the same variables ySiz and zSiz, without editing it, it gives different values.
Before BeginPlay() it gives the correct values (3 and 3) while inside the BeginPlay() it gives (-8484849(a nimber kinda like this) and 0).
I have no idea about what’s wrong, I’m really stuck here.
Can anybody help? Thanks a lot!
This should be a uproperty.
Any unreal based class (USomething, ASomething, etc) should be uproperty or it will eventually be garbage collected by unreal. Accessing garbage collected data could potentially work but give bogus results.
Non unreal/classes like int, float, FString, FVector (structs) are fine without uproperty.
Also you could bind all your values to a vector and then print that for ease of typing, if ya wanted.
FVector(xSiz, ySiz, zSiz).ToString()
I would assume TArray depends on it’s contents, be it int or UObjects.
Basically whether the class derives from UObject at some point and can be an object in game, or if it’s just used for data like strings, ints, structs, etc.
I’m no professional on the subject, just a guy who ran into similar problems a while ago.