This commit is contained in:
2025-05-16 23:31:59 +08:00
parent 9e4fef3f1e
commit d891e3f0ee
1198 changed files with 274242 additions and 1558 deletions

View File

@@ -0,0 +1,30 @@
using UnityEngine;
namespace VLB_Samples
{
[RequireComponent(typeof(Camera))]
public class CameraToggleBeamVisibility : MonoBehaviour
{
[SerializeField] KeyCode m_KeyCode = KeyCode.Space;
void Update()
{
if (Input.GetKeyDown(m_KeyCode))
{
var cam = GetComponent<Camera>();
int layerID = VLB.Config.Instance.geometryLayerID;
int layerMask = 1 << layerID;
if ((cam.cullingMask & layerMask) == layerMask)
{
cam.cullingMask &= ~layerMask;
}
else
{
cam.cullingMask |= layerMask;
}
}
}
}
}