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

StateMachineAttribute Constructor

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

Declaration

public StateMachineAttribute(string extension, StateMachineOptions options);

Parameters

Parameter Description
extension The file extension to associate with assets of the state machine type. This value must be unique because Unity uses it to select the correct importer.
options The configuration options for the state machine. Defaults to StateMachineOptions.Default if not specified.

Description

Initializes a new instance of the StateMachineAttribute class with a file extension and optional state machine options.

Use this constructor to define the asset extension and configure the state machine. This allows for proper asset recognition and import handling by Unity. The values in StateMachineOptions support bitwise combination. Combine multiple flags to configure the state machine with custom behavior.