Mixing few mods into one

This commit is contained in:
SDraw 2023-09-09 19:10:01 +03:00
parent 8e6ad925ac
commit 65632c763e
No known key found for this signature in database
GPG key ID: BB95B4DAB2BB8BB5
13 changed files with 109 additions and 106 deletions

View 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;
}
}
}