Unity-Technologies/com.unity.multiplayer.samples.coop

Errors when importing

jonathan84clark opened this issue · 2 comments

Describe the bug
When I import version 1.8.0 of the Multiplayer Sample Utilities I get the following errors in my Library cache (which prevent me from building).

Library\PackageCache\com.unity.netcode.gameobjects@1.7.1\Runtime\Core\NetworkObject.cs(76,34): error CS0103: The name 'FindObjectsByType' does not exist in the current context
Library\PackageCache\com.unity.netcode.gameobjects@1.7.1\Runtime\Core\NetworkObject.cs(76,67): error CS0103: The name 'FindObjectsInactive' does not exist in the current context
Library\PackageCache\com.unity.netcode.gameobjects@1.7.1\Runtime\Core\NetworkObject.cs(76,96): error CS0103: The name 'FindObjectsSortMode' does not exist in the current context

Version 1.6.1 imported into my project successfully.

To Reproduce
Steps to reproduce the behavior:

  1. Go to Window -> Package Manager
  2. '+' button
  3. Import package by name 'com.unity.netcode.gameobjects'
  4. '+' button
  5. Import from Git url
  6. https://github.com/Unity-Technologies/com.unity.multiplayer.samples.coop.git?path=/Packages/com.unity.multiplayer.samples.coop#main

Errors show up in the console.

Expected behavior
I expect NO errors when I import this library.

Environment (please complete the following information):

  • OS: Windows 10
  • Unity Version: 2021.3.7f1
  • Lobby Version: 1.0.3
  • ParrelSync Version: 1.5.2
  • Netcode for GameObjects version 1.7.1
  • Relay version 1.0.5

Additional context
This error does not appear to be dependent on a specific project. If I create a new project in Unity 2021.3.7f1 the error reproduces as soon as I import this package.

Thanks,

Jonathan L Clark

Hi @jonathan84clark,

We would recommend you to upgrade to a newer, or the latest version of 2021.3 LTS, as Netcode for GameObjects should work fine there.

It's important to note that support for 2021.3 LTS will end in Q2 of next year, so if it's possible for you, try upgrading to 2022.3 LTS.

I'll leave this open for a few days, but will close eventually since this is just a compatibility issue between Netcode for GameObjects and the editor.

I hope that helps!

Hi @fernando-cortez,

I did notice that when I attempted to import this into a new project in a later version of Unity it didn't show any errors. I was unaware that the support for the current version of Unity I'm using is ending soon.

Thanks for the help, I will upgrade to the 2022.3 LTS.

Jonathan L Clark