Animator Transition Builder - ShoninVRC/ShoninAssets GitHub Wiki
License
このスクリプトはMITライセンスで提供致します。
This script is provided under the MIT license.
LICENSE:https://github.com/ShoninVRC/ShoninAssets/blob/master/LICENSE
Background
VRChat内で大量のポーズを切り替えたいので実装しました。多分他にもっと凝ったツールはあります。
I implemented this because I wanted to switch between a large number of poses within VRChat. There are probably other, more sophisticated tools out there.
Usage
エディタ画面上部のShoninAssets/Animator Transition Builderからウィンドウを開きます。
Animator Controller 内のステートマシンに対して、指定したパラメータに基づいたトランジションを自動構築します。
■ 基本設定
- Animator Controller: 編集対象の Animator Controller アセットをセットします。
- Target State Machine: トランジションを設定したいステートマシン(最上位レイヤーまたはサブステートマシン)を選択します。
■ トランジション出発点設定
- Source Type: 遷移の出発点(出発元)を選択します。
Entry: 初期状態からの遷移を作成します。Any State: 任意のステートからの遷移を作成します。Specific State: 特定のステートからの遷移を作成します(選択時、下にSource Stateが表示されます)。
⚠️ 注意事項 (HelpBox 警告)
サブステートマシン内でAny Stateを選択した場合、そのサブステートマシン内だけでなくレイヤー全体(最上位レベル)のステートから遷移可能になります。意図しない挙動を防ぐため、画面上の警告内容をご確認ください。
■ 使用パラメータ設定
パラメータの「名称」および「型 (Int / Float / Bool)」を設定します。
- Int: ステートのインデックス番号に応じた Equals 条件で遷移し、条件不一致で Exit します。
- Bool:
Bool Target Value(True / False) に応じて遷移します。 - Float:
Float Min/Float Maxのトグル条件に従って Exit トランジションを作成します。 - パラメータを追加: ボタンを押すことで複数の条件パラメータを組み合わせて設定できます。
■ 生成オプション
- 既存トランジションをクリア: チェックを入れると、選択した出発点の既存トランジションを削除してから再作成します。
- トランジションを自動生成: 設定内容に基づいてトランジションを構築します。
Open the window from ShoninAssets/MaterialChanger at the top of the editor screen.
Automatically generates transitions for the state machine within the Animator Controller based on the specified parameters.
■ Basic Settings
- Animator Controller: Set the Animator Controller asset you want to edit.
- Target State Machine: Select the state machine (top-level or sub-state machine) for which you want to configure transitions.
■ Transition Starting Point Settings
- Source Type: Select the starting point (source) of the transition.
Entry: Creates a transition from the initial state.Any State: Creates a transition from any state.Specific State: Creates a transition from a specific state (when selected,Source Stateappears below).
⚠️ Important Note (HelpBox Warning)
If you selectAny Statewithin a sub-state machine, transitions will be possible not only from states within that sub-state machine but also from states in the entire layer (top-level). To prevent unintended behavior, please review the warning displayed on the screen.
■ Parameter Settings
Set the parameter’s “Name” and “Type (Int / Float / Bool)”.
- Int: Transitions based on an
Equalscondition corresponding to the state’s index number; exits if the condition does not match. - Bool: Transitions based on the
Bool Target Value(True / False). - Float: Creates an Exit transition based on the toggle conditions for
Float MinandFloat Max. - Add Parameter: Click this button to combine and configure multiple conditional parameters.
■ Generation Options
- Clear Existing Transitions: Check this box to delete existing transitions from the selected starting point and then recreate them.
- Automatically Generate Transitions: Builds transitions based on the settings.