CalculatorTransitionの挙動

Here is the forum to do the questions about how to use to Arbor developer.
Attention point:
  • We can not answer your questions about your project specific issues.
  • We can not answer your questions on Unity's specification issues.
  • Please check Arbor Documentation and ask a question if you still don't know how to use it. If the desired function is not described in the document, it is highly possible that the function does not exist from the beginning, so go to the request forum.

ここは、Arbor開発者へ使い方に関する質問を行うフォーラムです。
注意点:
  • ユーザー様のプロジェクトの仕様上の問題や設計に対する質問には答えられません。
  • Unityの仕様上の問題に対する質問には答えられません。
  • Arbor Documentationを確認の上、それでも使い方がわからない場合にご質問ください。欲しい機能の記載がドキュメントにない場合は機能が元から存在しない可能性が高いので要望フォーラムへ。

Forum rules
Here is the forum to do the questions about how to use to Arbor developer.
Attention point:
  • We can not answer your questions about your project specific issues.
  • We can not answer your questions on Unity's specification issues.
  • Please check Arbor Documentation and ask a question if you still don't know how to use it. If the desired function is not described in the document, it is highly possible that the function does not exist from the beginning, so go to the request forum.

ここは、Arbor開発者へ使い方に関する質問を行うフォーラムです。
注意点:
  • ユーザー様のプロジェクトの仕様上の問題や設計に対する質問には答えられません。
  • Unityの仕様上の問題に対する質問には答えられません。
  • Arbor Documentationを確認の上、それでも使い方がわからない場合にご質問ください。欲しい機能の記載がドキュメントにない場合は機能が元から存在しない可能性が高いので要望フォーラムへ。
warapuri
Posts: 2
Joined: 2020/04/08 06:04

CalculatorTransitionの挙動

Post by warapuri »

お世話になっております。
Arborでの条件分岐によるTransitionに関して質問があります。

ボタンを押すと何かの関数を呼ぶ、ということをしたいのですが、うまくいきません。
コメント 2020-04-08 151329.png
コメント 2020-04-08 151329.png (59.63 KiB) Viewed 4647 times
図のように、関数の結果をboolで出しそれをリルートして、ConditionListの第1引数として代入しています。
「全てのデータ値を表示」してみると正常に「True」が入っているのですが、遷移してくれません。

同じStateでの代入はいけないのでしょうか?
User avatar
caitsithware
管理人
Posts: 493
Joined: 2015/08/17 12:41

Re: CalculatorTransitionの挙動

Post by caitsithware »

InvokeMethodのOnStateUpdateとCalculatorTransitionの組み合わせでの問題についてですね。

現状、CalculatorTransitionはステートに入った瞬間のみ判定するようになっています。
そのため、InvokeMethodのOnStateUpdateからの値出力ではタイミング的に遅く、値が受け渡されないままCalculatorTransitionの判定に入り、結果遷移されない。という状況になります。

対策案は以下の通りです(呼び出すメソッドや遷移タイミングの都合もあるかと思うのであくまで参考程度ですが)
  1. InvokeMethodをOnStateBeginで行うように変更。
  2. 一番下にGoToTransitionを追加し、自分に遷移。
参考グラフ(InvokeMethodでの呼び出し先が手元にないため、Rigidbody.IsSleeping()で代用)
CalculatorTransitionGraph.png
CalculatorTransitionGraph.png (88.24 KiB) Viewed 4645 times

CalculatorTransitionについてはこのままでは不便な点もあるため、今後タイミング指定なども追加しようか検討いたします。
warapuri
Posts: 2
Joined: 2020/04/08 06:04

Re: CalculatorTransitionの挙動

Post by warapuri »

素早いご返答ありがとうございます!
了解しました。GoToTransitionで対処することにいたします。
Post Reply