TG9six 03a642d635 first push
first push
2025-09-06 17:17:39 +04:00

35 lines
904 B
C#

// Perfect Culling (C) 2021 Patrick König
//
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Serialization;
namespace Koenigz.PerfectCulling
{
/// <summary>
/// Allows to forcefully clamp the sampling position to the closest portal (instead of the closest cell)
/// </summary>
public class PerfectCullingPortalCell : MonoBehaviour
{
[FormerlySerializedAs("CullingVolume")] public PerfectCullingVolume cullingVolume;
private void OnEnable()
{
cullingVolume.AddPortalCell(this);
}
private void OnDisable()
{
cullingVolume.RemovePortalCell(this);
}
private void OnDrawGizmos()
{
Gizmos.color = Color.yellow;
Gizmos.DrawWireCube(transform.position, 0.25f * Vector3.one);
}
}
}