Int dependency on another int in the details panel inside blueprint

Hello everyone, i have 3 int variables.

UPROPERTY(EditAnywhere)
int One;

UPROPERTY(EditAnywhere)
int Two;

UPROPERTY(EditAnywhere)
int Three;

I want, that in Details panel inside Blueprint variables change relative to each other. For example, if i change “Two”, then Three calculates as One / Three, if i change “Three”, then Two calculates as One / Two. How can i do that?

writing for up

Write a setter function for each of the variables to set the other two.

I think something like this would work (though I wonder if you meant to have the value of Three to depend on One and Two, not One and Three):

UPROPERTY(BlueprintSetter = SetTwo)
int Two;

UFUNCTION(BlueprintSetter)
void SetTwo(int Value) 
{ 
  Two = Value; 
  Three = One / Three; 
}