Skip to content

Commit 71ebbef

Browse files
eordanoclaude
andauthored
fix: pin BoneHider's object sweeps to the two-argument FindObjectsByType overload
Both BoneHider menu items passed FindObjectsInactive.Exclude as the only argument, leaving the sort mode to whichever overload the compiler resolves - the shape the review read as a compile break. They only flip a flag on every result, so instance-ID ordering is work nobody consumes, and the repo's other call site (NearbyAudioSourceFactoryShould.cs:46) already spells the pair out. Naming FindObjectsSortMode.None explicitly restores the pre-change FindObjectsOfType<T>() semantics (inactive excluded, unsorted) and leaves no overload ambiguity to resolve. Utility/AssemblyInfo.cs now carries the constraint behind that assembly's csc.rsp: Utility must compile with zero compiler diagnostics, because any message emitted for Utility.dll makes Unity's assembly updater read Utility.mvfrm and crashes the incremental macOS Cloud Build. That is the reason for -nullable:annotations + -nowarn:0168; a .rsp file has nowhere to hold it, so without this the flags read as an arbitrary downgrade and get "fixed" back. FIXNOTES.md records the two review items that take no code change: the CheckNamespace ban behind the 21 removed suppressions already landed in 05db1c0 (#9396), an ancestor of this PR's base, so merge ordering is satisfied and no .editorconfig override is wanted (§ Namespaces prescribes leaving the inspection visible); and the fresh green Editor-assembly build owed to this branch's head cannot be produced outside the Unity Cloud lanes. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018c638dR1vPysCMbYt2qQg5
1 parent aa0b122 commit 71ebbef

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

Explorer/Assets/DCL/AvatarRendering/AvatarShape/Editor/BoneHider.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ public class BoneHider : ScriptableWizard
88
public static void ToggleBones()
99
{
1010
// Find all instances of BoneRenderer in the scene.
11-
BoneRenderer[] bones = FindObjectsByType<BoneRenderer>(UnityEngine.FindObjectsInactive.Exclude);
11+
BoneRenderer[] bones = FindObjectsByType<BoneRenderer>(UnityEngine.FindObjectsInactive.Exclude, UnityEngine.FindObjectsSortMode.None);
1212

1313
// Check if there are any bones to toggle. If not, simply return.
1414
if (bones.Length == 0) return;
@@ -27,7 +27,7 @@ public static void ToggleBones()
2727
public static void ToggleEffectors()
2828
{
2929
// Find all instances of Rig in the scene.
30-
Rig[] rigs = FindObjectsByType<Rig>(UnityEngine.FindObjectsInactive.Exclude);
30+
Rig[] rigs = FindObjectsByType<Rig>(UnityEngine.FindObjectsInactive.Exclude, UnityEngine.FindObjectsSortMode.None);
3131

3232
// Initialize a flag to indicate if the valueToSet has been determined.
3333
bool valueDetermined = false;
Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
using System.Runtime.CompilerServices;
1+
// This assembly must compile with zero compiler diagnostics: any message emitted for
2+
// Utility.dll makes Unity's assembly updater read Utility.mvfrm, which crashes the
3+
// incremental macOS Cloud Build. That is why csc.rsp here carries -nullable:annotations
4+
// instead of -nullable:enable, plus -nowarn:0168.
5+
6+
using System.Runtime.CompilerServices;
27

38
[assembly: InternalsVisibleTo("SceneLifeCycle.Tests")]
49
[assembly: InternalsVisibleTo("DCL.EditMode.Tests")]

0 commit comments

Comments
 (0)