Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

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

Discussion in 'Entity Component System' started by Phenotype, Nov 25, 2022.

  1. Phenotype

    Phenotype

    Joined:
    Oct 26, 2010
    Posts:
    42
    Looks like a bug in: Library\PackageCache\com.unity.transport@1.3.0\Runtime\IPCManager.cs

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

    Lines 79, 88, 107

    Example: for (var i = 0; i < m_IPCChannels.Count(); ++i)
     
  2. Spy-Master

    Spy-Master

    Joined:
    Aug 4, 2022
    Posts:
    153
    That's probably from an incompatibility with whatever version of the collections package is used in the project. The collections API has been pretty unstable with a number of breaking changes. Try updating either the transport package or the collections package to the latest preview.
     
  3. Phenotype

    Phenotype

    Joined:
    Oct 26, 2010
    Posts:
    42
    All my packages are up-to-date. Unity Transport is using an older version of collections 1.2.4 while I am on 2.1.0 so that is likely where the problem is. Thanks
     
  4. Spy-Master

    Spy-Master

    Joined:
    Aug 4, 2022
    Posts:
    153
    Transport goes up to 2.0.0-pre.2.
     
  5. Phenotype

    Phenotype

    Joined:
    Oct 26, 2010
    Posts:
    42
    I don't have the option to upgrade it for some reason, probably because it's added as a dependency for netcode.
     
  6. PamuxStudios

    PamuxStudios

    Joined:
    May 11, 2014
    Posts:
    1
    A released package should never depend on a pre-release package. If it has to, then it should also be called pre-release.
     
  7. Spy-Master

    Spy-Master

    Joined:
    Aug 4, 2022
    Posts:
    153
    OK, and? What package / version are you referring to?