Files
ADOFAIRenderer/Patch/ClassPatch/scrPortalParticlesPatch.cs
T
2026-05-26 22:39:35 +09:00

28 lines
802 B
C#

using HarmonyLib;
using UnityEngine;
namespace ADOFAIRenderer.Patch.ClassPatch
{
[HarmonyPatch(typeof(scrPortalParticles))]
// ReSharper disable once InconsistentNaming
public static class scrPortalParticlesPatch
{
[HarmonyPostfix]
[HarmonyPatch("Start")]
// ReSharper disable once InconsistentNaming
public static void Postfix(scrPortalParticles __instance)
{
if (__instance == null) return;
var particleSystems = __instance.GetComponentsInChildren<ParticleSystem>(true);
foreach (var ps in particleSystems)
{
if (ps == null) continue;
var main = ps.main;
main.useUnscaledTime = false;
}
}
}
}