Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


OnConditionChanged()

Called after the condition's data changes and the built-in UI has refreshed to reflect it.
Read time 1 minuteLast updated 12 days ago

Definition

public virtual void OnConditionChanged()

Remarks

Fires after an edit recorded through StateMachine.UndoBeginRecordStateMachine and StateMachine.UndoEndRecordStateMachine is applied to ConditionView<T>.Condition — whether the edit came from the built-in UI (typing in the value field, picking a comparison operator) or from your own code. Override this to refresh custom UI you added in ConditionView<T>.OnViewBuilt so it reflects the condition's current data. Unlike ConditionView<T>.OnViewBuilt, this can fire many times over the view's lifetime.

Examples

public override void OnConditionChanged(){ m_IconImage.image = Condition.Icon;}