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
@@ -1,20 +1,14 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using UnityEngine.EventSystems;
|
||||
#if ENABLE_INPUT_SYSTEM
|
||||
using UnityEngine.InputSystem.UI;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// In-game paint UI. Shows its panels only while the active <see cref="GameMode"/> is
|
||||
/// <see cref="PaintMode"/> (follows the manager's ModeChanged) and binds its widgets directly to the
|
||||
/// live <see cref="MeshPainter"/> fields, so edits apply immediately.
|
||||
///
|
||||
/// The layout (independently draggable sub-panels per channel + a global brush card) comes from the
|
||||
/// authored prefab (<see cref="layoutPrefab"/>). The BINDINGS live in code and are (re)applied at
|
||||
/// runtime by <see cref="WirePanel"/> against stable widget names - the prefab stores only the
|
||||
/// visual layout, never behaviour.
|
||||
/// In-game paint UI. Visible only while the active <see cref="GameMode"/> is <see cref="PaintMode"/>;
|
||||
/// binds its widgets directly to the live <see cref="MeshPainter"/> fields. The prefab stores only the
|
||||
/// visual layout; the bindings live in code, (re)applied by <see cref="WirePanel"/> against stable widget names.
|
||||
/// </summary>
|
||||
[DisallowMultipleComponent]
|
||||
public partial class PaintHud : MonoBehaviour
|
||||
@@ -119,7 +113,6 @@ public partial class PaintHud : MonoBehaviour
|
||||
// (in BindPainter) overwrites them. The reset button restores exactly these.
|
||||
CaptureAuthoredLayout();
|
||||
|
||||
// The paint library now lives inside the authored layout prefab; bind its widgets like the brush panel.
|
||||
BindLibrary(_panel ? _panel.transform : null);
|
||||
|
||||
// Bind as soon as a painter exists. With networked spawn-on-connect there is none at scene
|
||||
@@ -443,11 +436,8 @@ public partial class PaintHud : MonoBehaviour
|
||||
return s;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Attaches (idempotently) a <see cref="DraggablePanel"/> to the whole panel so it can be dragged
|
||||
/// from any of its non-interactive surface (header, padding, labels, background); the component
|
||||
/// ignores presses that start on a widget (toggle, slider, colour picker).
|
||||
/// </summary>
|
||||
/// <summary>Attaches (idempotently) a <see cref="DraggablePanel"/> so the whole panel can be
|
||||
/// dragged from any non-widget surface.</summary>
|
||||
private void MakeDraggable(Transform root, string panelName)
|
||||
{
|
||||
var panel = GeometryUtil.FindDeep(root, panelName) as RectTransform;
|
||||
|
||||
Reference in new issue
Block a user