Search Issue Tracker

Fix In Review

Votes

0

Found in

2.0.0

Issue ID

UUM-142524

Regression

No

Warnings due to obsolete Object.FindObjectsByType<T> usage and [SerializeReference] are logged when opening the Netcode for Entities setup scene

Multiplayer Center

-

Steps to reproduce:

  1. Create a new 3D URP project
  2. Go to Window > Multiplayer > Multiplayer Center
  3. Set "Genre of your Game" to Adventure and "Number of Players..." to 2
  4. Change the "Netcode Solution" dropdown to "Netcode for Entities"
  5. Click Install Packages
  6. Once installed, click "Create and open scene with netcode setup"
  7. Observe the Console once opened

Actual results: Multiple warnings are logged in the Console, including obsolete API usage warnings and {{[SerializeReference]}} warnings about types missing the {{[Serializable]}} attribute

Expected results: No warnings are logged

 

 

Reproducible with versions: 6000.4.7f1, 6000.5.0b9

Not reproducible with versions: 6000.3.16f1 (methods not deprecated)

Can’t test with versions: 6000.6.0a5 (due to Multiplayer Center change and netcode setup scene not existing anymore)

Tested on (OS): macOS 26.5

Few of the Warnings:
{code:java}
The type Unity.Multiplayer.Center.Integrations Unity.Multiplayer.Center.Integrations.NecsOnboardingSection is being serialized by [SerializeReference], but is missing the [Serializable] attribute. To suppress this warning add [Serializable] or use [MakeSerializable].{code}
{code:java}
The type Unity.Multiplayer.Center.Integrations Unity.Multiplayer.Center.Integrations.MultiplayerPlayModeOnboardingSection is being serialized by [SerializeReference], but is missing the [Serializable] attribute. To suppress this warning add [Serializable] or use [MakeSerializable].{code}
{code:java}
The type Unity.Multiplayer.Center.Integrations Unity.Multiplayer.Center.Integrations.MultiplayerPlayModeOnboardingSection is being serialized by [SerializeReference], but is missing the [Serializable] attribute. To suppress this warning add [Serializable] or use [MakeSerializable].{code}
{code:java}
Assets/NetcodeForEntitiesSetup/Scripts/AutoDeactivateExtraComponents.cs(10,34): warning CS0618: 'Object.FindObjectsByType<T>(FindObjectsSortMode)' is obsolete: 'FindObjectsByType with FindObjectsSortMode parameter has been deprecated. Use FindObjectsByType<T>() or FindObjectsByType<T>(FindObjectsInactive) instead. InstanceID will be replaced in the future with EntityId and previous sort order cannot be maintained.'{code}
 

Add comment

Log in to post comment