Hello,
I try to design a resource structure. Now i am in a deadlock for a small issue. The deadlock has been made compacted and scaled down to find quick answer.
Two exported variables are in the resource code. One is edge length of a square. The other one is the area of the square. I only want to change the edge length and display the area value. Even, the area property is touched, it will keep the value as edge dependent area.
tool
extends Resource
class_name Square
export (float) var edgeOfSquare = 10.0 setget edgeOfSquare_set, edgeOfSquare_get
export (float) var areaOfSquare setget areaOfSquare_set, areaOfSquare_get
func edgeOfSquare_set(value1):
edgeOfSquare = value1
areaOfSquare = value1 * value1
print_debug("edgeOfSquare_set")
func edgeOfSquare_get():
print_debug("edgeOfSquare_get")
return edgeOfSquare
func areaOfSquare_set(value2):
areaOfSquare = edgeOfSquare * edgeOfSquare
print_debug("areaOfSquare_set")
func areaOfSquare_get():
print_debug("areaOfSquare_get")
return areaOfSquare
However, the area variable can not change when the edge variable changes. The area variable changes into calculated value, when clicking the revert symbol or typing a random value in the box only.

is any change requires in setget structure or any automatic revert clicking possibility in code?
thanks in advance
