Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Bug Non-invocable member 'NativeHashMap<ushort, int>.Count' cannot be used like a method

Discussion in 'Netcode for GameObjects' started by Slashbot64, Jan 8, 2024.

  1. Slashbot64

    Slashbot64

    Joined:
    Jun 15, 2020
    Posts:
    348
    Library\PackageCache\com.unity.transport\Runtime\IPCManager.cs(79,44): error CS1955: Non-invocable member 'NativeHashMap<ushort, int>.Count' cannot be used like a method.

    Library\PackageCache\com.unity.transport\Runtime\IPCManager.cs(88,40): error CS1955: Non-invocable member 'NativeHashMap<ushort, int>.Count' cannot be used like a method.

    Library\PackageCache\com.unity.transport\Runtime\IPCManager.cs(107,47): error CS1955: Non-invocable member 'NativeHashMap<ushort, int>.Count' cannot be used like a method.



    no idea.. seems broken when installing the package
     
  2. simon-lemay-unity

    simon-lemay-unity

    Unity Technologies

    Joined:
    Jul 19, 2021
    Posts:
    441
    What version of the Unity Transport package are you using? And which version of the Collections package?

    This seems like a mismatch in versions between the two packages. At a glance, I'd guess Transport is at 1.X and Collections at 2.X. If you want to use Collections 2.X, you should be using version 2.X of the Transport package (the latest version is 2.2.1).
     
  3. Slashbot64

    Slashbot64

    Joined:
    Jun 15, 2020
    Posts:
    348
    Unity 2023.3.0a18 installed: netcode for gameobjects 1.7.1.... collections 2.2.1, transport 2.1.0

    plenty of errors
     
  4. simon-lemay-unity

    simon-lemay-unity

    Unity Technologies

    Joined:
    Jul 19, 2021
    Posts:
    441
    I know this sounds dumb, but have you tried restarting the editor? We've had reports of issues before when upgrading Collections from 1.X to 2.X and restarting the editor would solve those.
     
  5. Slashbot64

    Slashbot64

    Joined:
    Jun 15, 2020
    Posts:
    348
    yes that might have solved it, seems to work now