Immediate 指定のTransitionのふるまいに関しまして

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を確認の上、それでも使い方がわからない場合にご質問ください。欲しい機能の記載がドキュメントにない場合は機能が元から存在しない可能性が高いので要望フォーラムへ。
moyashiking
Posts: 17
Joined: 2018/10/04 05:32

Immediate 指定のTransitionのふるまいに関しまして

Post by moyashiking »

たびたびお世話になりますm(_ _)m

Transition のImmediate 指定について色々と試していたところ、気になる挙動があったので確認させてください。
Immediate指定のループのステートにTranslateを含めてみたところ、Velocityの指定が反映されませんでした。
試しに同じステートにカウンタを追加してみましたが、そちらは普通に動作しておりました。
これもやはり、処理の優先度によるものでしょうか?
Unity 2018.2.11f1 Personal (64bit) - SampleScene.unity - test_Arbor(ClickTest) - PC, Mac & Linux Standalone _DX11_ 2018-10-12 18.16.46.png
Unity 2018.2.11f1 Personal (64bit) - SampleScene.unity - test_Arbor(ClickTest) - PC, Mac & Linux Standalone _DX11_ 2018-10-12 18.16.46.png (382.6 KiB) Viewed 3997 times
User avatar
caitsithware
管理人
Posts: 493
Joined: 2015/08/17 12:41

Re: Immediate 指定のTransitionのふるまいに関しまして

Post by caitsithware »

TransformTranslateの処理タイミング(Update Method Type)がUpdateかOnStateUpdateしかなく、CalcParameterやGoToTransitionはOnStateBeginで処理している関係ですね。
開始ステート側のGoToTransitionをImmediateにし、TransformTranslate側のGoToTransitionをLateUpdateDontOverwriteにすると1ループ内の処理は同じでありながら期待通りの動作になるかと思います。

つまり、
  1. 開始ステート
    • 特に何も処理せず、瞬時にTransfromTranslateステートへ遷移。
  2. TransfromTranslateステート
    • GoToTransformのOnStateBeginでLateUpdate時に遷移するように予約
      (もしImmediateにしてしまうとここで遷移してしまうため、それ以降の処理が呼ばれない)
    • TransfromTranslateのUpdateで移動処理。
    • LateUpdateにて予約済みの遷移先に遷移。
    という流れになる、ということになります。

    ちなみに、今回の場合ですと無理に遷移させる必要がなく、
    開始ステートにTransformTranslateを1個設定するだけでも、毎フレーム移動いたします。
    (もちろん、ほかに毎フレーム何らかの処理をする場合はImmediateによる遷移も必要になってきますが)

    TransformTranslateFSM.png
    TransformTranslateFSM.png (44.43 KiB) Viewed 3995 times
    (↑最小限、移動させたいだけならこれだけでOK)

    また、その都度聞かれるのも大変かと思いますので、現状どうやって処理の流れを確認すればいいかもお教えいたします。
    1. 各StateBehaviourの歯車アイコンをクリック
    2. スクリプト編集を選択。
    3. スクリプトを見て、どのメソッドで処理しているか確認。
    もし、プログラムについてわからない点があれば、チーム内のプログラマに解析をお願いするか、個人であれば最低限のプログラミングの知識は得ておくと良いかと思います。
    (Arborはプログラミングを前提としたアセットですので、使いこなすとなるとプログラミングは必須になっていますので)

    チュートリアルもありますので、もしまだお試しでなければ試してみてくださいね。
    チュートリアル
moyashiking
Posts: 17
Joined: 2018/10/04 05:32

Re: Immediate 指定のTransitionのふるまいに関しまして

Post by moyashiking »

詳細な解説ありがとうございますm(_ _)m
大変参考になりました、またひっかかるようであればスクリプト部分も確認していきたいと思います。
Post Reply