Unity2021から標準パッケージとなった”Visual Scripting(ビジュアルスクリプティング)”(旧Bolt)を使用して、Cinemachineのユニットを出そうとしても初期状態では出てこない。その場合の設定方法です。
※前提としてPackage ManagerからCinemachineのパッケージをインストールしているものとします。
設定前
設定前は以下のようにグラフ内で”cinemachine”と検索すると、C#スクリプトの結果はいくつか出てきますが、”Virtual Camera”などのユニットは出てきません。

設定方法
Cinemachine関連のタイプを追加する必要があります。
1.”Edit”→”Project Settings…”を押下

2.左の一覧から”Visual Scripting”を選択

3.”Type Options”の▶を押下して展開する。

4.一覧の一番下にある”+”を押下

5.”(No Type)”が追加される。

6.右端の▽を押下し、検索窓に”Cinemachine”と入力するとCinemachine関連のTypeが出てくる。

7.今回は例として”Cinemachine Virtual Camera”を追加する。

8.追加されたことを確認

8.少し下の”Regenerate Nodes”を押下して変更を反映させる。

設定は以上。
※念のため、”Node Library”の一覧の中に”Cinemachine”、”com.unity.cinemachine.Editor”の2つがあることを確認(Package ManagerからCinemachineのパッケージをインストールした際に自動的に追加されているはず)


設定後
再度、グラフで”cinemachine”で検索すると、上記で追加した”Cinemachine Virtual Camera”関連のユニットが表示されている。


コメント