ドキュメント

Unity Engine

Unity Engine

StateMachineAttribute(string, StateMachineOptions)

Initializes a new instance of the StateMachineAttribute class with a file extension and optional state machine options.
読み終わるまでの所要時間 1 分最終更新 2ヶ月前

Definition

public StateMachineAttribute(string extension, StateMachineOptions options = StateMachineOptions.Default)

Parameters

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.

The configuration options for the state machine. Defaults to StateMachineOptions.Default if not specified.

Remarks

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.

Examples

[StateMachine("mystatemachine", StateMachineOptions.DisableAutoInclusionOfStatesFromStateMachineAssembly)]public class MyStateMachine : StateMachine { }