기술 자료

Unity Engine

Unity Engine

OnConditionChanged()

Called after the condition's data changes and the built-in UI has refreshed to reflect it.
읽는 시간 1분최근 업데이트: 2달 전

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;}