Skip to content

Conversation

@NoelStephensUnity
Copy link
Member

@NoelStephensUnity NoelStephensUnity commented Jan 26, 2026

WIP-TODO:

  • This PR depends upon the trunk PR-89134 to be merged before determining:
    • The version of trunk that PR-89134 will be included in.
  • This PR currently uses 6000.5.0a8 as the minimum version, for 6000.5, where the updates to account for the deprecated enum and methods in order to pass tests.
    • If PR-89134 is merged into 6000.5.0a7, then one more adjustment to the asmdef files will be required.

Purpose of this PR

Making adjustments to the changes in FindObjectsByType. Funneling all find object related calls into a single static method in order to simplify the current, and any future, updates/changes to FindObjectsByType.

Jira ticket

MTT-14339

Changelog

  • Changed: Updating usage of deprecated FindObjectsByType(FindObjectsSortMode) and enum FindObjectSortMode.

Documentation

  • No documentation changes or additions were necessary.

Testing & QA (How your changes can be verified during release Playtest)

Functional Testing

Manual testing :

  • Manual testing done
    • Verify earlier versions of 6000.4 and 6000.5 work as expected
      • Open test project in 6000.4.b5 or earlier to verify NGO uses the (now deprecated) UnityEngine.FindObjectsSortMode.
      • Open test project in 6000.5.a6 or earlier to verify NGO uses the (now deprecated) UnityEngine.FindObjectsSortMode.
    • Verify newer versions of 6000.4 and 6000.5 work as expected
      • Open test project in 6000.4.b6 or later to verify NGO no longer uses UnityEngine.FindObjectsSortMode.
      • (WIP) Open test project in 6000.5.a7/a8 or later to verify NGO no longer uses UnityEngine.FindObjectsSortMode.
        • Waiting on PR-89134.

Automated tests:

  • Covered by existing automated tests
  • Covered by new automated tests

Does the change require QA team to:

  • Review automated tests?
  • Execute manual tests?
  • Provide feedback about the PR?

If any boxes above are checked the QA team will be automatically added as a PR reviewer.

Backports

No back port required since this is specific to 6000.4 & 6000.5.

Funneling all find object related calls into a single static method in order to simplify the current, and any future, updates/changes to FindObjectsByType.
@NoelStephensUnity NoelStephensUnity requested review from a team and EmandM as code owners January 26, 2026 20:45
Making FindObjects internal.
Adjusted to explicit handling of the update within test project script to avoid having to make FindObjects public.
Adding [MethodImpl(MethodImplOptions.AggressiveInlining)] attribute to the T[] FindObjectsByType<T>() method.
Removing unused using directives.
Removing CR.
Copy link
Member

@EmandM EmandM left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I love love love this cleanup! :godmode:

NoelStephensUnity and others added 2 commits January 26, 2026 16:07
Adding same condition define, NGO_FINDOBJECTS_NOSORTING, to the testproject.manualtests assembly define.
Added more precise Unity engine versions to asmdef files to assure earlier versions of 6000.4 and 6000.5 still use the previous API.
Renamed FindObjects.FindObjectsByType to FindObjects.ByType
Updated FindObject.ByType to be able to sort by identifier and include inactive objects.
Adding sort by identifier to two locations that require sorting by identifier.
Added missing whitespace
increasing the 6000.5 version from 5.0a6 to 5.0a7 as it appears trunk is currently 5.0a6 (which doesn't have the deprecation merged into it yet).
updating minimum for deprecated fix to 6000.5.0a8.
Copy link
Member

@EmandM EmandM left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I love love love the latest name here! :godmode:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants