Upload from upload_mods.ps1

This commit is contained in:
Nathaniel Cosford
2025-06-04 16:13:32 +09:30
commit 7345f42201
470 changed files with 51966 additions and 0 deletions

View File

@@ -0,0 +1,38 @@
using System.Collections.Generic;
using UnityEngine;
namespace KFCommonUtilityLib.KFAttached.Render
{
[AddComponentMenu("")]
internal class MagnifyScopeTargetRef : MonoBehaviour
{
private HashSet<MagnifyScope> targets = new HashSet<MagnifyScope>();
private void OnRenderImage(RenderTexture source, RenderTexture destination)
{
foreach (var target in targets)
{
target.RenderImageCallback(source, destination);
}
Graphics.Blit(source, destination);
}
internal void AddTarget(MagnifyScope target)
{
if (targets.Count == 0)
{
enabled = true;
}
targets.Add(target);
}
internal void RemoveTarget(MagnifyScope target)
{
targets.Remove(target);
if(targets.Count == 0 )
{
enabled = false;
}
}
}
}