SHA256
forked from ADOFAIEditorForum/ADOFAIRenderer
Fix Portal Particle Control
This commit is contained in:
1 parent
66190e4db7
commit
1b46baf4f7
1 file changed
+27
@@ -0,0 +1,27 @@
|
|||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in new issue
Block a user