@@ -27,7 +27,7 @@ In addition, the state transition method corresponds to the following.
2727
2828This package also provide an Editor tool, so you can easily create states.
2929
30- ![ image] ( https://user-images.githubusercontent.com/49301086/137613577-d510a77c-0231-4e76-bf0f-a6f16a2ae506 .png )
30+ ![ image] ( https://user-images.githubusercontent.com/49301086/183348165-6042c870-ac33-479a-b5fa-af210f345352 .png )
3131
3232
3333## Installation
@@ -60,6 +60,10 @@ https://github.com/k-okawa/UniTaskStateMachine.git?path=Assets/Bg/UniTaskStateMa
6060openupm add com.bg.unitaskstatemachine
6161```
6262
63+ ### UnityPackage
64+
65+ You can download unity package in [ release page] ( https://github.com/k-okawa/UniTaskStateMachine/releases ) .
66+
6367## How to use
6468### 1.Add StateMachineBehaviour Component
6569
@@ -71,7 +75,7 @@ GraphEditorOpen of StateMachineBehaviour added in 1
7175
7276Or you can open the graph editor with Window / BG UniTaskStateMachine / StateMachineGraph.
7377
74- ![ image] ( https://user-images.githubusercontent.com/49301086/143770686-8efd36c8-35fc-40a5-a1ec-4862a2dda9e3 .png )
78+ ![ image] ( https://user-images.githubusercontent.com/49301086/183349573-556b2bfb-968c-40ef-91b9-acde45bf5f65 .png )
7579
7680### 3.How to add state
7781#### 3-1.Add StateBehaviour
@@ -83,6 +87,8 @@ Add a Component that inherits BaseStateComponent to the GameObject to which Stat
8387
8488* Do not addBaseStateComponent directly.
8589
90+ * Do not add same state component
91+
8692** Example**
8793``` c#
8894namespace Bg .UniTaskStateMachine .Tests .BasicSceneTest
@@ -113,7 +119,7 @@ namespace Bg.UniTaskStateMachine.Tests.BasicSceneTest
113119
114120Right-click on the Graph editor and select Create State to add State.
115121
116- ![ image] ( https://user-images.githubusercontent.com/49301086/143770989-faa1a688-2ecd-4407-87d7-3e9b2a4c570a .png )
122+ ![ image] ( https://user-images.githubusercontent.com/49301086/183352350-6de6bec5-b304-4a1a-b668-049c6841a9eb .png )
117123
118124The added class name will be displayed and can be selected.
119125
@@ -149,6 +155,20 @@ It can be set by right-clicking on the State and selecting Set as Entry.
149155
150156![ image] ( https://user-images.githubusercontent.com/49301086/143771406-b0e40166-fd07-4091-8e98-a5cac1ba83f2.png )
151157
158+ ### TriggerNextTransition
159+
160+ It is possible to translate state manually by transition id without specify condition method.
161+
162+ Transition id is recommended upper camel case that can use in C# field name.
163+
164+ After define transition id, you can generate transition id constant template code by GenerateTransitionIdConst button.
165+
166+ ![ image] ( https://user-images.githubusercontent.com/49301086/183354384-8c33ea1d-53a3-4bae-95f1-2011c0ddd660.png )
167+
168+ Finally, call "StateMachine.TriggerNextTransition(string transitionId)" for manual state transition.
169+
170+ It is able to call with string direct writing, but recommend with readonly string field in the generated template class.
171+
152172## API Reference
153173### StateMachine
154174It can be accessed from the StateMachine property of the StateMachineBehaviour.
0 commit comments