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

IStateOption

interface in Unity.GraphToolkit.Editor

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

Description

Interface for a state option.

State options are typed properties that appear in the graph inspector when a state is selected. They allow the tool developers to change the behavior of the state at edit time. Unlike the options of a Node, they are never drawn on the state in the state machine canvas. Each option has a unique IStateOption.Name (which must be unique per state for identification), a IStateOption.DisplayName (for the UI), and a IStateOption.DataType that defines the type of its value. Use IStateOption.TryGetValue to retrieve the option's value.

See also:

Unity implements this interface. Do not implement it in your own types.

Properties

Property Description
DataType The data type of the state option.
DisplayName The display name of the state option shown in the UI.
Name The unique identifier of the state option.
Tooltip The text displayed when hovering over the state option's display name.

Public Methods

Method Description
TryGetValue Tries to retrieve the value of the state option using the specified type.
TrySetValue Sets a new value for the state option.