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
@@ -107,7 +107,7 @@ public class GameModeManager : MonoBehaviour
|
||||
if (!freeCam) freeCam = FindFirstObjectByType<FreeCamController>(FindObjectsInactive.Include);
|
||||
if (!firstPerson) firstPerson = FindFirstObjectByType<FirstPersonController>(FindObjectsInactive.Include);
|
||||
|
||||
BuildModes();
|
||||
BuildModes(null);
|
||||
}
|
||||
|
||||
private void Start()
|
||||
@@ -125,8 +125,6 @@ public class GameModeManager : MonoBehaviour
|
||||
/// <summary>Registers the modes for the current context. Without a role (no networked avatar yet,
|
||||
/// or a non-networked scene) the full set is built from whichever rigs are present. With a role the
|
||||
/// set is scoped to that side and ordered so index 0 is its intended start mode. Add new modes here.</summary>
|
||||
private void BuildModes() => BuildModes(null);
|
||||
|
||||
private void BuildModes(PlayerRole? role)
|
||||
{
|
||||
_modes.Clear();
|
||||
@@ -480,7 +478,7 @@ public class GameModeManager : MonoBehaviour
|
||||
for (int i = 0; i < avatars.Count; i++)
|
||||
{
|
||||
var avatar = avatars[i];
|
||||
if (!avatar || avatar.IsOwner) continue; // skip the local player's own avatar
|
||||
if (!avatar || avatar.IsOwner) continue;
|
||||
var col = avatar.BodyCollider;
|
||||
if (col && col.enabled) Physics.IgnoreCollision(capsule, col, ignore);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user