Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Is it possible to have NetworkServer check to see if game object has already been Destroyed?

Discussion in '5.3 Beta' started by tlee2, Nov 4, 2015.

  1. tlee2

    tlee2

    Joined:
    Oct 13, 2015
    Posts:
    2
    It would be nice if there's a way for the client to send a [Command] to the server asking if a game object the client has references to had been Destroyed by the NetworkServer.

    Something like:

    Code (csharp):
    1. bool NetworkServer.hasDestroyed(GameObject obj); //Or NetworkIdentity, connectionID, etc.
    Since we're going for a server/client architecture, it would be a good idea for the clients (remote and local) to check with the server to see if the data are accurate. Latency issues could cause the NetworkServer to destroy a game object too many times, throwing additional errors and confusing the developers in the process.

    Or something that says:

    Code (csharp):
    1. bool NetworkClient.checkIntegrity(GameObject obj); //NetworkIdentity, connectionID, etc.
    Which makes the client go check and verify data with the server. This way, it would be useful for the developers, as they would be able to tell the clients to check the data with the servers, and give messages/useful debugging info to the developers on what to do from there.

    It's just a suggestion. Good idea?
     
  2. seanr

    seanr

    Unity Technologies

    Joined:
    Sep 22, 2014
    Posts:
    669
    Why? Have you seen cases where objects don't exist on the server? That shouldnt happen..
     
  3. tlee2

    tlee2

    Joined:
    Oct 13, 2015
    Posts:
    2
    Yes. Probably a rare case, but it's a "HandleTransform no gameObject" error that occurs when destroying game objects.