Search Unity

Third Party weird error with mirror: Could not spawn assetId=00000000-0000-0000-0000-000000000000

Discussion in 'Multiplayer' started by jorianrennen, Nov 14, 2020.

  1. jorianrennen

    jorianrennen

    Joined:
    Aug 3, 2020
    Posts:
    9
    Hi there,

    I was making my single player game a multiplayer game and suddenly I got this weird error. upload_2020-11-14_11-45-56.png
    This error pops up when i try to connect my client to my host. Also, the client reacts weird on the hosts screen, but the host reacts fine on the clients screen. Is this an effect of this error?

    After searching online I tried many things which include: Saving scenes at another folder, save scene as a new scene and replacing network identity. I don't know where the error came from but I found it a strange error.

    I hope someone can help me, because I don't know what I'm looking for.

    Thank you in advance,
    Jorian
     
  2. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Make sure to recompile both server & client after doing any changes to the project.
     
  3. jorianrennen

    jorianrennen

    Joined:
    Aug 3, 2020
    Posts:
    9
    What do you mean with recompile?
    I'm new to unity so I'm a noob;)
     
  4. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Let's say you have your Unity project open in Unity Editor.
    You build it once for your server (e.g. linux).
    You run the server.
    You build it again for client (e.g. windows).
    You run the client.
    Everything works.

    Now you change something in your Unity Project.
    You build the client.
    Now your client can't properly communicate with your still server anymore because you also need to build the server again after changing the project.
     
  5. jorianrennen

    jorianrennen

    Joined:
    Aug 3, 2020
    Posts:
    9
    Ok,

    I've done some further research and it seems like when I build the game this error isn't there anymore, only when I connect my client to the server via the play button in the editor.
    I feel stupid now because I've waited 2 weeks for this error to be solved while it's not there when building:(, but I got some extra questions.
    1. Does this error cause problems? Because I can move completely fine but syncing my gun from the client to server does go wrong, can this be caused by this error or is it something in my scripts?
    2. Also I got this warning: Replacing existing prefab with assetId '055b0227-5b8d-0c54-0aff-eeb135743bac'. Old prefab 'Tank', New prefab 'Tank'
    3. My last question is if this warning can cause trouble: Prefab 'Tank' has multiple NetworkIdentity components. There should only be one NetworkIdentity on a prefab, and it must be on the root object.

    I hope you would like to give me advice with this questions!
     
  6. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Warnings are an indicator that you did something unusual which might cause issues.
    So if you have issues, look at the warnings first :)

    The third one is definitely not good and could be the reason for your original problem.
     
  7. jorianrennen

    jorianrennen

    Joined:
    Aug 3, 2020
    Posts:
    9
    The problem is still unsolved, I think the real culprit is that 2nd warning. Unity tries to replace my spawn prefab with itself? Do you know how to fix this error? I solved the third one but the problem still persists. It seems probable to me that if unity tries to replace a prefab with itself that unity can't find the first one, which result in those 2 errors in the beginning. I have no idea how to fix the second warning, any idea?

    really thank you for responding and helping me out, appreciate it!
     
  8. jorianrennen

    jorianrennen

    Joined:
    Aug 3, 2020
    Posts:
    9
  9. Delvarn

    Delvarn

    Joined:
    Apr 6, 2020
    Posts:
    10
    Having the same issue!
    ```Replacing existing prefab with assetId '2fce3758-1fa4-5254-4b6b-316d97ca9468'. Old prefab 'EmptyRoomPlayer', New prefab 'EmptyRoomPlayer'```
     
  10. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Can't see your screen from here guys :)
    Please try to reproduce with one of our built in examples / join our discord help channel / post on issue tracker if you think you found a bug.
     
  11. icepick912

    icepick912

    Joined:
    Jul 8, 2010
    Posts:
    58
    For me it happens because I had a child networked object as a child of my network manager. It don't like that.