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

Looks like a bug in: Library\PackageCache\com.unity.transport@1.3.0\Runtime\IPCManager.cs

Compiler Error: Non-invocable member 'NativeHashMap.Count' cannot be used like a method.

Lines 79, 88, 107

Example: for (var i = 0; i < m_IPCChannels.Count(); ++i)

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.

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

[quote=“Phenotype”, post:3, topic: 901240]
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
[/quote]
Transport goes up to 2.0.0-pre.2.

I don't have the option to upgrade it for some reason, probably because it's added as a dependency for netcode.

A released package should never depend on a pre-release package. If it has to, then it should also be called pre-release.

[quote=“PamuxStudios”, post:6, topic: 901240]
A released package should never depend on a pre-release package. If it has to, then it should also be called pre-release.
[/quote]
OK, and? What package / version are you referring to?

Installing both entities and netcode for gameobject simultaneously can cause this issue, possibly due to a conflict between the version required by entities and netcode for gameobject

2 Likes

I think it's a collection issue

9171983--1276889--YCH4JAN(~1L05SEL7J8RS5L.png

Unity Serialization had a higher Collections dependency for me. When I uninstalled it, I was able to use a lower collections which fixed the issue.

9197105--1282388--Screenshot 2023-08-05 164637.png

Add package by name 'com.unity.transport' and 'your desired version' manually fix it.

1 Like