Set/Get UProperty inside of USTRUCT directly

szyszek
Thu, 16 Apr 2015 10:34:18 +0000
Editor Scripting

Hi,

I’d like to set&get ustruct property value. What I have is

UProperty* Property - property that I want to get (float)

UObject* PropertyOwner - owner of this property (UStruct in this case)

For example: I’m trying to get FilmContrast value from FPostProcessSettings struct inside camera component.

So normally I would do something like this: *Property->ContainerPtrToValuePtr(PropertyOwner) to get this property value. But because PropertyOwner is a UStruct the line above crashes.

I’ve seen some examples in the source code that uses ContainerPtrToValuePtr method but I’m not sure if this is the right way to get into ustruct properties and how exactly can i do it.

Any help/advice will be greatly appreciated,

Cheers

8 posts - 6 participants