I know, but I need that method for a specific usage :
I make a dynamicActor blueprint + UI to change mesh,material and color of picked actors.
I used a conventionnal method to do so.
I wanted to go a bit further to give the ability to change actor variables.
For example I have a blueprint which generates a Picture Frame (for archviz). In the editor you can change the type of frame, the picture, the size, etc.
And I wanted my dynamicActor to be able to pick this actor (or any other), let the user the ability to set the variable he wants to be dynamic, and, then in game, via the UI, choose between multiple configurations, and update the actor.
This is just an example, but with this method, my dynamicActor is then capable to change any variable of any actor.
I could do this for Int, Float, but also boolean and String.
Now I’d like to do the same for Color, Texture, Material, StaticMesh and LightProfile but I’m stucked because I don’t know what to put instead of UIntProperty and Get and SetPropertyValue_InContainer. I tried UProperty or UObjectProperty but they give errors. What do you think?
The red parts are incorrect.
bool UShooterFunctions::GetColorByName(UObject* Target, FName VarName, FLinearColor& outColor)
UObjectProperty* ColorProp = FindField<UObjectProperty>(Target->GetClass(), VarName);
FoundColor = ColorProp->GetPropertyValuePtr_InContainer(Target);
outColor = ColorProp;