もっと参考サイト
clusterでポストプロセスやBGMをローカルでオンオフする
https://zenn.dev/dolphiiiin/articles/0a43028c6e3cf0
PostProcessingを使ってワールドをより魅力的にする
目次
Post Processingをインポート
PackageManagerから詮索でPostProccessingで検索してインストールしておきます。
ローカルでオンオフするには、ヒエラルキーで右クリック、UI>PlayerLOcalUIを作成
Post processVolumeは右クリック、3DObject > Post proscess Volumeで出せます。
ポストプロセッシングの設定
1. ヒエラルキーのPost Process Volumeを選択し、InspectorのLayerの値をPostProcessingに変更します。
2. Post Process VolumeコンポーネントプロパティのIs Globalにチェックを入れます。
ProfileのNewをクリックします。
Add effect…> unity > Bloomを選択
3. Bloomの▶から設定を開きIntensity1.5に、Thresholdを1.4(Thresholdの値をもっと小さくすれば、全体的にふんわりした光になります)にします。
4.Post Process VolumeのBoxColliderの範囲を広げておく、この範囲がPost Process Volumeが適用される範囲です。
ヒエラルキーの、PlayerLocalUI > SafeArea > の中に、Post-processVolumeを入れる
Post proscess VolumeのインスペクタはSet Game Object Active Gimmick(script)を追加
Target:LocalPlayer
key:Bloom
ボタンを3Dオブジェクトで作ります。
インスペクタの設定Interact Item Trigger(script)
Target:Owner(interact)
value:Signal
Player Logic(script)の追加
Target:Player
Key:(interact)
Player(Bloom) Bool
=Not
RoomState Bool Player (Bloom)
これで、プレイヤーのみ、ボタンを押すとBloomのオンオフができます。
コメントを残す