Closed IO5 closed 9 months ago
After debugging for a bit: OnUpdate() gets called even on a disabled parameter, but there's actually no code path that sets the parameter back to incomplete.
I'm having a hard time believing that. My understanding is that when disableOnStateChange
is true
then the enabled
field gets changed to false
and thus OnUpdate()
no longer gets called either.
I'm having a hard time believing that. My understanding is that when
disableOnStateChange
istrue
then theenabled
field gets changed tofalse
and thusOnUpdate()
no longer gets called either.
You're right. I was testing with Rendezvous as a child of VesselParameterGroup which alters the normal disableOnStateChange logic. I'll revert that line.
I noticed Rendezvous Parameter not turning incomplete when I get away from a target vessel, even though I had disableOnStateChange set to false.
After debugging for a bit: OnUpdate() gets called even on a disabled parameter, but there's actually no code path that sets the parameter back to incomplete.
I added that and also a check for .Enabled at the begining of OnUpdate() since there's isn't much point in checking the distance if the parameter can't change state.