Search Unity

Game Assert Failed

Discussion in 'FPS.Sample Game' started by lachie1919, Dec 19, 2018.

  1. lachie1919

    lachie1919

    Joined:
    Feb 3, 2017
    Posts:
    3
    upload_2018-12-19_15-31-29.png

    My Build was working fine one day and the next it gives me these errors when creating the server.

    Any Ideas?

    Thanks
     
  2. AggressiveMastery

    AggressiveMastery

    Joined:
    Nov 19, 2018
    Posts:
    206
    Seems like the last thing it did was update the spawnpoint, what were you working on prior to this compile?

    I normally get these when I forget to re-register a networked entity... but this makes me think maybe your spawnpoint wash modified.
     
    lachie1919 likes this.
  3. lachie1919

    lachie1919

    Joined:
    Feb 3, 2017
    Posts:
    3
    Thanks for the response ,

    Unfortunately the last changes that I made to the code worked fine , but the last thing I did before getting this error was import a few .blend models from my previous projects.

    I have gone back quite a few steps to try and see what change caused the issue but not successful.
     
  4. AggressiveMastery

    AggressiveMastery

    Joined:
    Nov 19, 2018
    Posts:
    206
    If you are trying to add in new networked-models, that would trigger it.
     
    lachie1919 likes this.
  5. lachie1919

    lachie1919

    Joined:
    Feb 3, 2017
    Posts:
    3
    Ahh okay that sounds like it could be the issue, how could i add those models so that they work correctly?

    Thank you.
     
  6. AggressiveMastery

    AggressiveMastery

    Joined:
    Nov 19, 2018
    Posts:
    206
    Search the pre-fab folder of the FPS sample for "Movable" prefab, that is the start of the FPS Team's "network movable" items. It includes the Movable Script on the models, which then locks them in place on all clients, and allows the server movable items to work.

    You can launch a server, join as a client and "spawn boxes 1" I believe the code is... To spawn in some Movable boxes that are networked, from there... expand :)

    Also, the destroyable barrels are networked, but not movable. Meaning the exploding parts do not sync between clients... Unless you applied the movable script to them... From this stacking of scripts, you can make anything :D

    attached are two pictures of the barrel (destroyable networked) and the box(movable networked)

    GL HF
    destroyable.PNG movablecube.PNG
     
    lachie1919 likes this.
  7. AggressiveMastery

    AggressiveMastery

    Joined:
    Nov 19, 2018
    Posts:
    206
    Also, on each model, you have a "Replicated Entity" which must be unique (its the model's network identifier.) So you create a prefab, add the right scripts, then "register" to obtain an index #. Then, if done correctly, the server will load that index # on the client and host when it runs, and you wont get Game-Assertion issues due to it. I almost have cars, mountable, working, ill put up a vid after I get that figured out.
     
    lachie1919 likes this.