Version: Unity 6.7 Beta (6000.7)
LanguageEnglish
  • C#

TransitionReference.WidthOverride

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

public float WidthOverride;

Description

The line width override applied to the referenced transition.

Setting the value to 0 removes the width override on the transition. Setting a new value overwrites any existing width override for that transition. On a state-to-state transition, this property sets the width of the transition's wire and of the border of its arrow. On a self transition, this property sets the width of the transition arrow's border. Getting or setting this property has no effect, and getting it returns 0f, when the TransitionReference has no associated TransitionReference.Context, such as when it is default. Throws ObjectDisposedException when you access this property after you call Context.Dispose on the context.

Override the line width of a transition so it appears thicker than the default thickness.

 TransitionReference transitionRef = context.GetTransitionReference(transitionID);
 transitionRef.WidthOverride = 4f;