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:
1 parent
eeee5fc2f0
commit
6c03e5d3f6
48 files changed
+289
-481
No files matched your search
@@ -4,26 +4,22 @@ using UnityEngine.Rendering;
|
||||
using UnityEngine.Rendering.Universal;
|
||||
|
||||
/// <summary>
|
||||
/// Builds the environment reflection from the current Skybox in memory (renders
|
||||
/// the sky into a cubemap and assigns it as the Custom reflection), so
|
||||
/// smooth/metallic materials reflect the sky WITHOUT a baked LightingData.asset.
|
||||
/// Runs in Edit and Play mode ([ExecuteAlways]); drop it on one object per scene
|
||||
/// (or a prefab that lives in every scene) and you never have to assign a foreign
|
||||
/// LightingData again — also works for runtime-loaded / procedural scenes.
|
||||
/// Builds the environment reflection from the current Skybox in memory (renders the sky into a cubemap
|
||||
/// assigned as the Custom reflection), so smooth/metallic materials reflect the sky WITHOUT a baked
|
||||
/// LightingData.asset. Runs in Edit and Play mode ([ExecuteAlways]); drop it on one object per scene —
|
||||
/// also works for runtime-loaded / procedural scenes.
|
||||
///
|
||||
/// Why a rendered cubemap and not <see cref="DynamicGI.UpdateEnvironment"/>:
|
||||
/// in this project UpdateEnvironment does NOT produce a valid skybox reflection
|
||||
/// probe (a mirror stays black), so <see cref="RenderSettings.reflectionIntensity"/>
|
||||
/// had nothing to scale. Rendering the sky into a Custom reflection cubemap gives a
|
||||
/// real reflection that intensity can actually drive.
|
||||
/// Why a rendered cubemap and not <see cref="DynamicGI.UpdateEnvironment"/>: in this project
|
||||
/// UpdateEnvironment does NOT produce a valid skybox reflection probe (a mirror stays black), so
|
||||
/// <see cref="RenderSettings.reflectionIntensity"/> had nothing to scale. Rendering the sky into a
|
||||
/// Custom reflection cubemap gives a real reflection that intensity can actually drive.
|
||||
///
|
||||
/// The skybox AMBIENT probe still comes from UpdateEnvironment — but it only convolves a
|
||||
/// non-zero probe once the sky has actually been rendered this session. Straight after a
|
||||
/// domain reload / scene load / play-start the sky hasn't rendered yet, so the probe is
|
||||
/// ZERO and the Environment intensity multiplier has nothing to scale ("doesn't take
|
||||
/// effect" until a manual re-enable). Fix: do one synchronous full-screen sky render to
|
||||
/// "warm" the sky right before UpdateEnvironment — deterministic, no waiting on renders.
|
||||
/// (RenderToCubemap does NOT warm the ambient path; a normal Camera.Render does.)
|
||||
/// The skybox AMBIENT probe still comes from UpdateEnvironment — but it only convolves a non-zero probe
|
||||
/// once the sky has actually been rendered this session. Straight after a domain reload / scene load /
|
||||
/// play-start the sky hasn't rendered yet, so the probe is ZERO and the Environment intensity multiplier
|
||||
/// has nothing to scale ("doesn't take effect" until a manual re-enable). Fix: one synchronous
|
||||
/// full-screen sky render "warms" the sky right before UpdateEnvironment — deterministic, no waiting on
|
||||
/// renders. (RenderToCubemap does NOT warm the ambient path; a normal Camera.Render does.)
|
||||
/// </summary>
|
||||
[ExecuteAlways]
|
||||
[DisallowMultipleComponent]
|
||||
|
||||
Reference in new issue
Block a user