Skip to content

fix: clear Unity deprecated API warnings#274

Draft
JOY (JOY) wants to merge 1 commit into
devfrom
fix/unity-console-warnings
Draft

fix: clear Unity deprecated API warnings#274
JOY (JOY) wants to merge 1 commit into
devfrom
fix/unity-console-warnings

Conversation

@JOY
Copy link
Copy Markdown
Contributor

Summary

  • Replace obsolete Unity object lookup overload with the current FindObjectsByType API.
  • Remove obsolete BuildOptions.EnableHeadlessMode while keeping the server build subtarget.

Validation

  • git diff --check
  • rg -n "FindObjectsSortMode|EnableHeadlessMode" Unity/Assets/_SecondSpawn returned no matches
  • Unity validation queue: feat/unity-validation-workflow + fix/unity-console-warnings, D3D11 batch compile passed
  • Validation log confirmed Forcing GfxDevice: Direct3D 11 and return code 0
  • Validation log had no warning CS0618, FindObjectsSortMode, EnableHeadlessMode, Unity crash, package resolve failure, or compile error matches

Notes

  • The Visual Studio UDP port warning is environment/editor integration state, not game code. This PR only clears the two deprecated API warnings.

@JOY
Copy link
Copy Markdown
Contributor Author

Local reviewer fallback: APPROVED.

Reviewed scope:

  • Unity/Assets/_SecondSpawn/Scripts/AI/PrototypeNearbyNpcChatBox.cs
  • Unity/Assets/_SecondSpawn/Editor/SecondSpawnBuildUtility.cs

Findings: no blocking issues. The FindObjectsByType overload change preserves inactive-object filtering and removes the obsolete sort parameter. The Linux server build still uses StandaloneBuildSubtarget.Server, so removing obsolete BuildOptions.EnableHeadlessMode preserves the intended headless server target. Unity D3D11 validation queue passed with no deprecated API warnings found in the log.

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.

1 participant