So I have this script here:
[SerializeField] float diameterKm = 0f; // Diameter in km
public float DiameterKm {
get { return diameterKm; }
set { diameterKm = value; Radius = (double)diameterKm * 500.0; } // Updates radius
}
[SerializeField] double radius = 0.0; // Radius in meters
public double Radius {
get { return radius; }
set { radius = value; }
}
So what should happen ( Or at least I hoped it would) is that when I change the “diameterKm” in the inspector, it would also recalculate the radius, but it dosen’t and I have no idea why, my best guess is that there us something small that I overlooked.