Refactor Assets/Scripts: trim restating comments, minor structure cleanups

Sweep over 48 files (Editor/ excluded): remove comments that restate the
code, condense class summaries, fix three stale doc statements
(HsvColorPicker alpha bar, PaintHud layoutPrefab, MasterVolume
FallbackDefault). Inline two single-use wrappers (IsPointerOverUi,
BuildModes), drop an unused using, replace a magic literal with the
existing ParallaxBase constant, and convert ~10 UnityEngine.Object null
checks to the implicit-bool convention. No serialized fields, signatures,
RPC/NetworkVariable names, defaults, or #if blocks touched.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
adminandClaude Fable 5 committed 2026-07-08 08:29:18 +02:00
1 parent eeee5fc2f0
commit 6c03e5d3f6
48 files changed
+289 -481

No files matched your search

+13 -16
View File
@@ -2,16 +2,15 @@ using UnityEngine;
using Unity.Cinemachine;
/// <summary>
/// Drives the world-space "hero cutout": occluder geometry inside a cone from the third-person camera
/// (apex) to the player is clipped away, punching a see-through funnel toward the character. Each late
/// frame this feeds two global shader properties (<c>_HeroCutoutTarget</c>, <c>_HeroCutoutParams</c>)
/// that <c>Custom/HeroCutoutLit</c> reads.
/// World-space "hero cutout": occluder geometry inside a cone from the third-person camera (apex) to
/// the player is clipped away, punching a see-through funnel toward the character. Each late frame this
/// feeds two globals (<c>_HeroCutoutTarget</c>, <c>_HeroCutoutParams</c>) that <c>Custom/HeroCutoutLit</c> reads.
///
/// Arming is deliberately simple: ONE ray from the camera toward the player - blocked = armed, clear
/// view = occluders stay solid. The cut volume lives entirely in the shader: everything between camera
/// and player (within the cone) is cut, geometry behind the player stays solid, and the far end fades
/// across a soft depth band (<see cref="depthFeather"/>) instead of a hard plane. The cone radius grows
/// with camera distance, so the hole keeps a constant on-screen size at every occluder depth.
/// Arming is deliberately simple: ONE ray camera -> player; blocked = armed, clear view = occluders stay
/// solid. The cut volume lives entirely in the shader: everything between camera and player (within the
/// cone) is cut, geometry behind the player stays solid, and the far end fades across a soft depth band
/// (<see cref="depthFeather"/>) instead of a hard plane. The cone tapers toward the camera, so the hole
/// keeps a constant on-screen size at every occluder depth.
///
/// Active only while the third-person orbit vcam is the live Cinemachine camera; disarming clears the
/// global flag (also the zero-initialised default), so scenes without this driver render cutout
@@ -193,9 +192,8 @@ public class HeroCutout : MonoBehaviour
}
/// <summary>
/// Lazily resolves the orbit vcam and its Cinemachine Deoccluder (they may live in a scene that
/// loads after this driver). Captures the deoccluder's authored obstacle-avoidance state once so it
/// can be restored later.
/// Lazily resolves the orbit vcam and its Deoccluder (they may live in a scene that loads after this
/// driver); captures the deoccluder's authored obstacle-avoidance state once so it can be restored.
/// </summary>
private void EnsureRefs()
{
@@ -209,9 +207,9 @@ public class HeroCutout : MonoBehaviour
}
/// <summary>
/// Switches the deoccluder's obstacle avoidance (the camera pull-in) off while this driver replaces
/// it with the cutout, or restores the authored state when the replacement is turned off. Only
/// toggles on transitions, so it never fights a value changed elsewhere mid-frame.
/// Toggles the deoccluder's obstacle avoidance (the camera pull-in) off/back per
/// <see cref="replaceDeoccluderPullIn"/>. Only acts on transitions, so it never fights a value
/// changed elsewhere mid-frame.
/// </summary>
private void ApplyPullInSuppression()
{
@@ -229,7 +227,6 @@ public class HeroCutout : MonoBehaviour
}
}
/// <summary>Restores the deoccluder's authored pull-in if this driver had suppressed it.</summary>
private void RestoreDeoccluderPullIn()
{
if (_pullInSuppressed && _deoccluder)