mirror of
https://github.com/hanetzer/sdraw_mods_cvr.git
synced 2025-09-05 03:19:23 +00:00
Mixing few mods into one
This commit is contained in:
parent
8e6ad925ac
commit
65632c763e
13 changed files with 109 additions and 106 deletions
31
ml_gmf/Fixes/PostProccesVolumes.cs
Normal file
31
ml_gmf/Fixes/PostProccesVolumes.cs
Normal file
|
@ -0,0 +1,31 @@
|
|||
using ABI_RC.Core.Player;
|
||||
using System.Collections;
|
||||
|
||||
namespace ml_gmf.Fixes
|
||||
{
|
||||
static class PostProccesVolumes
|
||||
{
|
||||
internal static void Init()
|
||||
{
|
||||
MelonLoader.MelonCoroutines.Start(FixVRCameraVolumeTarget());
|
||||
}
|
||||
|
||||
static IEnumerator FixVRCameraVolumeTarget()
|
||||
{
|
||||
while(PlayerSetup.Instance == null)
|
||||
yield return null;
|
||||
|
||||
while(PlayerSetup.Instance.vrCamera == null)
|
||||
yield return null;
|
||||
|
||||
UnityEngine.Rendering.PostProcessing.PostProcessLayer l_layer = null;
|
||||
while(l_layer == null)
|
||||
{
|
||||
l_layer = PlayerSetup.Instance.vrCamera.GetComponent<UnityEngine.Rendering.PostProcessing.PostProcessLayer>();
|
||||
yield return null;
|
||||
}
|
||||
|
||||
l_layer.volumeTrigger = PlayerSetup.Instance.vrCamera.transform;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue