Search Unity

HLAPI CRC channel count error local: 4 remote: 6

Discussion in 'Multiplayer' started by any_user, Jun 18, 2015.

  1. any_user

    any_user

    Joined:
    Oct 19, 2008
    Posts:
    374
    I have this error when trying to connect to a build made with the same project (local client works). Any ideas what it could be?

    Code (CSharp):
    1. HLAPI CRC channel count error local: 4 remote: 6
    HLAPI CRC channel count error local: 4 remote: 6
    UnityEngine.Debug:Internal_Log(Int32, String, Object)
    UnityEngine.Debug:LogError(Object)
    UnityEngine.Networking.NetworkCRC:Validate(CRCMessageEntry[], Int32) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkCRC.cs:50)
    UnityEngine.Networking.NetworkClient:OnCRC(NetworkMessage) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkClient.cs:626)
    UnityEngine.Networking.NetworkConnection:HandleMessage(Dictionary`2, NetworkReader, Int32, Int32) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkConnection.cs:301)
    UnityEngine.Networking.NetworkClient:Update() (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkClient.cs:472)
    UnityEngine.Networking.NetworkClient:UpdateClients() (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkClient.cs:686)
    UnityEngine.Networking.NetworkIdentity:UNetStaticUpdate() (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkIdentity.cs:707)

    (Filename: /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkCRC.cs Line: 50)

    CRC Local Dump CharacterTalkManager : 0
    UnityEngine.Debug:Internal_Log(Int32, String, Object)
    UnityEngine.Debug:Log(Object)
    UnityEngine.Networking.NetworkCRC:Dump(CRCMessageEntry[]) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkCRC.cs:84)
    UnityEngine.Networking.NetworkCRC:Validate(CRCMessageEntry[], Int32) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkCRC.cs:51)
    UnityEngine.Networking.NetworkClient:OnCRC(NetworkMessage) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkClient.cs:626)
    UnityEngine.Networking.NetworkConnection:HandleMessage(Dictionary`2, NetworkReader, Int32, Int32) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkConnection.cs:301)
    UnityEngine.Networking.NetworkClient:Update() (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkClient.cs:472)
    UnityEngine.Networking.NetworkClient:UpdateClients() (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkClient.cs:686)
    UnityEngine.Networking.NetworkIdentity:UNetStaticUpdate() (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkIdentity.cs:707)

    (Filename: /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkCRC.cs Line: 84)

    CRC Local Dump Player : 0
    UnityEngine.Debug:Internal_Log(Int32, String, Object)
    UnityEngine.Debug:Log(Object)
    UnityEngine.Networking.NetworkCRC:Dump(CRCMessageEntry[]) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkCRC.cs:84)
    UnityEngine.Networking.NetworkCRC:Validate(CRCMessageEntry[], Int32) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkCRC.cs:51)
    UnityEngine.Networking.NetworkClient:OnCRC(NetworkMessage) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkClient.cs:626)
    UnityEngine.Networking.NetworkConnection:HandleMessage(Dictionary`2, NetworkReader, Int32, Int32) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkConnection.cs:301)
    UnityEngine.Networking.NetworkClient:Update() (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkClient.cs:472)
    UnityEngine.Networking.NetworkClient:UpdateClients() (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkClient.cs:686)
    UnityEngine.Networking.NetworkIdentity:UNetStaticUpdate() (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkIdentity.cs:707)

    (Filename: /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkCRC.cs Line: 84)

    CRC Local Dump Character : 0
    UnityEngine.Debug:Internal_Log(Int32, String, Object)
    UnityEngine.Debug:Log(Object)
    UnityEngine.Networking.NetworkCRC:Dump(CRCMessageEntry[]) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkCRC.cs:84)
    UnityEngine.Networking.NetworkCRC:Validate(CRCMessageEntry[], Int32) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkCRC.cs:51)
    UnityEngine.Networking.NetworkClient:OnCRC(NetworkMessage) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkClient.cs:626)
    UnityEngine.Networking.NetworkConnection:HandleMessage(Dictionary`2, NetworkReader, Int32, Int32) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkConnection.cs:301)
    UnityEngine.Networking.NetworkClient:Update() (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkClient.cs:472)
    UnityEngine.Networking.NetworkClient:UpdateClients() (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkClient.cs:686)
    UnityEngine.Networking.NetworkIdentity:UNetStaticUpdate() (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkIdentity.cs:707)

    (Filename: /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkCRC.cs Line: 84)

    CRC Local Dump CharacterRopeManager : 0
    UnityEngine.Debug:Internal_Log(Int32, String, Object)
    UnityEngine.Debug:Log(Object)
    UnityEngine.Networking.NetworkCRC:Dump(CRCMessageEntry[]) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkCRC.cs:84)
    UnityEngine.Networking.NetworkCRC:Validate(CRCMessageEntry[], Int32) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkCRC.cs:51)
    UnityEngine.Networking.NetworkClient:OnCRC(NetworkMessage) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkClient.cs:626)
    UnityEngine.Networking.NetworkConnection:HandleMessage(Dictionary`2, NetworkReader, Int32, Int32) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkConnection.cs:301)
    UnityEngine.Networking.NetworkClient:Update() (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkClient.cs:472)
    UnityEngine.Networking.NetworkClient:UpdateClients() (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkClient.cs:686)
    UnityEngine.Networking.NetworkIdentity:UNetStaticUpdate() (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkIdentity.cs:707)

    (Filename: /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkCRC.cs Line: 84)

    CRC Remote Dump Player : 0
    UnityEngine.Debug:Internal_Log(Int32, String, Object)
    UnityEngine.Debug:Log(Object)
    UnityEngine.Networking.NetworkCRC:Dump(CRCMessageEntry[]) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkCRC.cs:89)
    UnityEngine.Networking.NetworkCRC:Validate(CRCMessageEntry[], Int32) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkCRC.cs:51)
    UnityEngine.Networking.NetworkClient:OnCRC(NetworkMessage) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkClient.cs:626)
    UnityEngine.Networking.NetworkConnection:HandleMessage(Dictionary`2, NetworkReader, Int32, Int32) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkConnection.cs:301)
    UnityEngine.Networking.NetworkClient:Update() (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkClient.cs:472)
    UnityEngine.Networking.NetworkClient:UpdateClients() (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkClient.cs:686)
    UnityEngine.Networking.NetworkIdentity:UNetStaticUpdate() (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkIdentity.cs:707)

    (Filename: /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkCRC.cs Line: 89)

    CRC Remote Dump Character : 0
    UnityEngine.Debug:Internal_Log(Int32, String, Object)
    UnityEngine.Debug:Log(Object)
    UnityEngine.Networking.NetworkCRC:Dump(CRCMessageEntry[]) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkCRC.cs:89)
    UnityEngine.Networking.NetworkCRC:Validate(CRCMessageEntry[], Int32) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkCRC.cs:51)
    UnityEngine.Networking.NetworkClient:OnCRC(NetworkMessage) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkClient.cs:626)
    UnityEngine.Networking.NetworkConnection:HandleMessage(Dictionary`2, NetworkReader, Int32, Int32) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkConnection.cs:301)
    UnityEngine.Networking.NetworkClient:Update() (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkClient.cs:472)
    UnityEngine.Networking.NetworkClient:UpdateClients() (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkClient.cs:686)
    UnityEngine.Networking.NetworkIdentity:UNetStaticUpdate() (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkIdentity.cs:707)

    (Filename: /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkCRC.cs Line: 89)

    CRC Remote Dump CharacterTalkManager : 0
    UnityEngine.Debug:Internal_Log(Int32, String, Object)
    UnityEngine.Debug:Log(Object)
    UnityEngine.Networking.NetworkCRC:Dump(CRCMessageEntry[]) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkCRC.cs:89)
    UnityEngine.Networking.NetworkCRC:Validate(CRCMessageEntry[], Int32) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkCRC.cs:51)
    UnityEngine.Networking.NetworkClient:OnCRC(NetworkMessage) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkClient.cs:626)
    UnityEngine.Networking.NetworkConnection:HandleMessage(Dictionary`2, NetworkReader, Int32, Int32) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkConnection.cs:301)
    UnityEngine.Networking.NetworkClient:Update() (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkClient.cs:472)
    UnityEngine.Networking.NetworkClient:UpdateClients() (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkClient.cs:686)
    UnityEngine.Networking.NetworkIdentity:UNetStaticUpdate() (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkIdentity.cs:707)

    (Filename: /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkCRC.cs Line: 89)

    CRC Remote Dump CharacterRopeManager : 0
    UnityEngine.Debug:Internal_Log(Int32, String, Object)
    UnityEngine.Debug:Log(Object)
    UnityEngine.Networking.NetworkCRC:Dump(CRCMessageEntry[]) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkCRC.cs:89)
    UnityEngine.Networking.NetworkCRC:Validate(CRCMessageEntry[], Int32) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkCRC.cs:51)
    UnityEngine.Networking.NetworkClient:OnCRC(NetworkMessage) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkClient.cs:626)
    UnityEngine.Networking.NetworkConnection:HandleMessage(Dictionary`2, NetworkReader, Int32, Int32) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkConnection.cs:301)
    UnityEngine.Networking.NetworkClient:Update() (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkClient.cs:472)
    UnityEngine.Networking.NetworkClient:UpdateClients() (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkClient.cs:686)
    UnityEngine.Networking.NetworkIdentity:UNetStaticUpdate() (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkIdentity.cs:707)

    (Filename: /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkCRC.cs Line: 89)

    CRC Remote Dump GoalManager : 0
    UnityEngine.Debug:Internal_Log(Int32, String, Object)
    UnityEngine.Debug:Log(Object)
    UnityEngine.Networking.NetworkCRC:Dump(CRCMessageEntry[]) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkCRC.cs:89)
    UnityEngine.Networking.NetworkCRC:Validate(CRCMessageEntry[], Int32) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkCRC.cs:51)
    UnityEngine.Networking.NetworkClient:OnCRC(NetworkMessage) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkClient.cs:626)
    UnityEngine.Networking.NetworkConnection:HandleMessage(Dictionary`2, NetworkReader, Int32, Int32) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkConnection.cs:301)
    UnityEngine.Networking.NetworkClient:Update() (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkClient.cs:472)
    UnityEngine.Networking.NetworkClient:UpdateClients() (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkClient.cs:686)
    UnityEngine.Networking.NetworkIdentity:UNetStaticUpdate() (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkIdentity.cs:707)

    (Filename: /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkCRC.cs Line: 89)

    CRC Remote Dump ServerStateManager : 0
    UnityEngine.Debug:Internal_Log(Int32, String, Object)
    UnityEngine.Debug:Log(Object)
    UnityEngine.Networking.NetworkCRC:Dump(CRCMessageEntry[]) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkCRC.cs:89)
    UnityEngine.Networking.NetworkCRC:Validate(CRCMessageEntry[], Int32) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkCRC.cs:51)
    UnityEngine.Networking.NetworkClient:OnCRC(NetworkMessage) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkClient.cs:626)
    UnityEngine.Networking.NetworkConnection:HandleMessage(Dictionary`2, NetworkReader, Int32, Int32) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkConnection.cs:301)
    UnityEngine.Networking.NetworkClient:Update() (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkClient.cs:472)
    UnityEngine.Networking.NetworkClient:UpdateClients() (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkClient.cs:686)
    UnityEngine.Networking.NetworkIdentity:UNetStaticUpdate() (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkIdentity.cs:707)

    (Filename: /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkCRC.cs Line: 89)
     
  2. seanr

    seanr

    Unity Technologies

    Joined:
    Sep 22, 2014
    Posts:
    669
    That means that the server has 6 NetworkBehaviour scripts and the client only has 4 NetworkBehaviour scripts. This is warning that the client and server dont match..
     
  3. any_user

    any_user

    Joined:
    Oct 19, 2008
    Posts:
    374
    scripts in the scene or in the project? it's the build i made from the project (no changes), it should be the same.
     
  4. any_user

    any_user

    Joined:
    Oct 19, 2008
    Posts:
    374
    I just checked, it also happens when I try to connect two (same) builds. It's always 4 local and 6 remote, independent of which one is the server.
     
  5. MartinLyne

    MartinLyne

    Joined:
    Apr 25, 2013
    Posts:
    30
    I'm getting this too, anyone got a hint as to why this might be? Could it be because I'm getting failed spawn attempts? Possibly to do with runtime registering prefabs?
     
  6. chrismarch

    chrismarch

    Joined:
    Jul 24, 2013
    Posts:
    472
    Still getting this with 5.1.1f1. "HLAPI CRC channel count error local: 25 remote: 23"
    I thought this was going to become a warning, because of all the false positives? I tried a couple times to do tweaks to prevent it, but it feels like playing whack-a-mole at this point.
     
  7. MarxentAnthony

    MarxentAnthony

    Joined:
    Feb 20, 2015
    Posts:
    18
    I also have this issue but it isn't crashing so has anyone a good way to find the incosistancy?
     
  8. meat5000

    meat5000

    Joined:
    Mar 5, 2013
    Posts:
    118
    I had created a NetworkBehaviour script to manage Players in the game. It had a bunch of (isServer) checks which were fine, but when I added a @Command CmdFunction to the script my game started flagging that error (4 remote:3). I only found that out after selectively removing everything from the script. I tried everything to remedy the error but interestingly the problem went away after inadvertently re-loading the editor.

    This means that something I had done had in fact fixed the error but something was not correctly updating in the editor between builds, so beware of that.

    I will mention that the only things active in my script, when it started working, were as follows :

    Code (JavaScript):
    1.     @Command
    2.     function CmdAddMyself()
    3.     {
    4.     }
    5.  
    6.     @Client
    7.     function AddMe()
    8.     {
    9.         CmdAddMyself();
    10.     }
    From which the only conclusion I can come to is that if you use the @Command ([Command]) attribute, you require a @Client ([Client]) method to access that Call-To-Server.
     
  9. MarxentAnthony

    MarxentAnthony

    Joined:
    Feb 20, 2015
    Posts:
    18
    FYI using [ClientCallback] instead of [Client] resolved the warning issues for me.
     
  10. meat5000

    meat5000

    Joined:
    Mar 5, 2013
    Posts:
    118
    I had tried that in the places of the script I'd used [Client] but that seemed to make no difference in my particular case.
     
  11. Zullar

    Zullar

    Joined:
    May 21, 2013
    Posts:
    651
    I have this problem as well. Here are the 2 errors I am getting on the Client (not the Host).

    HLAPI CRC channel count error local: 5 remote: 9
    UnityEngine.Networking.NetworkIdentity:UNetStaticUpdate()

    CRC Local Dump ActionBarController : 0
    UnityEngine.Networking.NetworkIdentity:UNetStaticUpdate()

    I am adding NetworkBehavior components at runtime during Awake() both on the Server and Client. I believe this is causing the channel count mismatch errors. However, even with the errors everything seems to be working fine (ClientRPC's and SyncVars are working).

    Is anybody else adding NetworkBehavior components during runtime Awake()? Is adding a NetworkBehavior component supported? Or do the NeworkBehavior components need to be part of the prefab? If so this creates problems for me...
     
  12. MarxentAnthony

    MarxentAnthony

    Joined:
    Feb 20, 2015
    Posts:
    18
    I think it 'should' be part of the prefab, in certain cases like when a NetworkBehavior is responsible for input ( we'll call NetworkedInputBehavior), have it attached but disabled by default,.

    Then have a separate network behavior ( we'll call NetworkSetup) which is enabled and has a reference to the NetworkedInputBehavior. When NetworkSetup::OnStartLocalPlayer is called have that method enable NetworkedInputBehavior
     
    Zullar likes this.
  13. OmarMoya

    OmarMoya

    Joined:
    Apr 26, 2014
    Posts:
    6
    I had the same error, and it seems that it was produced by a Game Object that had a NetworkIdentity and was created within the scene, and not instanciated by code after player connects... that worked for me
     
    Zullar likes this.
  14. Zullar

    Zullar

    Joined:
    May 21, 2013
    Posts:
    651
    Thanks for the responses. Can you help me understand your workflow Omar? What order do you connect/instantiate/add scripts?

    Here is my order
    Host creates game
    Client connects to game
    Host instantiates prefab
    Host prefab script calls Awake() which adds a bunch of NetworkBehavior scripts
    Host prefab is spawned (It's actually the player prefab, so I'm using NetworkServer.AddPlayerForConnection not NetworkServer.Spawn)
    Client prefab script calls Awake() which adds a bunch of NetworkBehavior scripts (the same scripts that were added to the prefab on Host are added on the client)

    In the end I gave up on using AddComponent(NetworkBehavior) and just added the scripts to the prefab and instead use GetComponent during initialization.
     
  15. OmarMoya

    OmarMoya

    Joined:
    Apr 26, 2014
    Posts:
    6
    This error appeared when i was testing a bonus pick-up system for my game, so i had the prefabs of the bonuses in the scene and not created in game play. I had to make a bonus manager to first spawn this bonuses when the layer connects, and get the sync variables (like if the bonus is alive or has been picked already, or the resurrection cooldown, etc).
    Maybe your problem is that you are using Awake() function, wich is called locally and has nothing to be with network syncs, so there are some frames where your variables in Awake() init are only on the client and were not informed to the server, you have to use another kind of initialization like
    MarxentAnthony said (OnStartLocalPlayer, etc)...
    All the prefabs have their scripts, and none is added to the game object during gameplay. And if i have to do so, it has to be by telling the server to do it, not locally.

    My workflow:
    Client connects to game (which it can also be the host).
    Player prefab is spawned
    The BonusManager spawns the bonuses from the registrered prefabs and
    syncs the variables.

    Hope it helps c:
     
  16. Zullar

    Zullar

    Joined:
    May 21, 2013
    Posts:
    651
    Oh I see. So instead of AddComponent(NetworkBehavior script) you are spawning prefabs that already contain NetworkBehavior scripts and attaching them to your GameObject?
     
  17. OmarMoya

    OmarMoya

    Joined:
    Apr 26, 2014
    Posts:
    6
    Yes, i am spawning prefabs with their respectives components, but im not attaching NetworkBehaviour scripts, they already have them in the prefab which is registered in the NetworkManager spawnable prefabs, so when i call NetworkServer.Spawn() im sure that all those spawned GOs have the same componnents.
     
    Zullar likes this.
  18. Disastorm

    Disastorm

    Joined:
    Jun 16, 2013
    Posts:
    132
    I feel like this message may sometimes be wrong ( maybe due to a bug ) ?

    I never got this message before until I added a prefab with a network behaviour and network identity on it into the scene.
    Nothing too crazy or advanced.
    And ever since then I get this message, so my guess is it may be related to how the clients create the scene, perhaps the networked object doesn't get created, or doesn't have the network behaviours added to it until after the error message is displayed.

    *edit
    I think what I said above may be true.
    This is straight from the documentation:

    So these network objects are disabled when the scene loads.
    I bet thats where the discrepancy comes from.
    So I don't think its due to any issue in the project or anything we did wrong, Its just that the error message is probably innacurate.
     
    JoRouss likes this.
  19. meat5000

    meat5000

    Joined:
    Mar 5, 2013
    Posts:
    118
    Zullar likes this.
  20. Zullar

    Zullar

    Joined:
    May 21, 2013
    Posts:
    651
    Oh thanks. I will try that.
     
  21. Glabrezu

    Glabrezu

    Joined:
    Aug 30, 2014
    Posts:
    24
    Error appeared for me when I accidentally opened my 5.1 project in 5.2 one time.

    Since then, I'm having this issue in 5.1. Deleted the Library folder, reimported all assets, it didn't help. Installed 5.1.2b3, didn't help. I'm still having it.
     
  22. Glabrezu

    Glabrezu

    Joined:
    Aug 30, 2014
    Posts:
    24
    Found the source... Eliminated gameObjects from the scene one at a time. The problem was being caused by a gameObject with a NetworkIdentity that wasn't added to the list of Registered Respawnable Prefabs in the NetworkManager.

    So it's unrelated to 5.2 and 5.1. I just happened to catch it when I migrated.
     
    Last edited: Aug 14, 2015
  23. dshook

    dshook

    Joined:
    Jul 14, 2015
    Posts:
    11
    I also had this problem which was very time consuming to track down. I narrowed it down to an RPC function in my gameSetup networkBehavior. I would get the error when a client connected and the function was in the script, even if it wasn't being called.

    I managed to fix it by adding the ClientCallback attribute to the function on top of the ClientRPC attribute so it now looks like this:

    Code (CSharp):
    1.    
    2.     [ClientCallback]
    3.     [ClientRpc]
    4.     public void RpcSetupPlayerIds()
    5.  
     
    Chom1czek likes this.
  24. ElDo

    ElDo

    Joined:
    Dec 22, 2013
    Posts:
    2
    I found this Thread because I encountered the same Error (with Unity 5.2.2f1) and now as I could fix it I want to let you know what I found out.
    In my case I could figure out that it was caused by my GameController Script which was loaded with the Scene. It is an empty GameObject placed on my Scene with just the GameController Script attached. This Script had a [Command] and as Long as it had the Command, even if it was never used or just an empty function, it throwed that error.
    So I removed that Command and added it's functionality to my PlayerScript which is the PlayerObject and Spawned for each Player OnConnect to get rid of this CRC Channel Count error.

    Hope this will help someone else in the future.
     
  25. freakrho

    freakrho

    Joined:
    Aug 19, 2013
    Posts:
    9
    I got this error and found out that any object with a NetworkBehaviour that has either [Command] or [ClientRpc] has to be added to the "Registered Spawnable Prefabs" list, even if it starts in the scene and won't be spawned, that fixed the problem for me.
     
    mauri_up likes this.
  26. malkere

    malkere

    Joined:
    Dec 6, 2013
    Posts:
    1,212
    I had a couple scripts marked as NetworkBehaviours from when I first started implementing multiplayer. Which auto-assigns them a NetworkIdentity in runtime. With them not registered as ClientPrefabs on both the Server and Client, it breaks everything. Though the warnings make no mention of any of that =o=

    putting the editor in host mode and searching for t:NetworkIdentity in the heirarchy shows everything with a netId. I noticed things on there that I wasn't Registering, and putting them back to MonoBehaviours fixed the mismatch.