Hello, I’m developing an online game on Unity 5.0, and I’m having issues to properly destroy game objects.
Currently the server is the owner of all game objects (we might make missiles local some day).
When a game round is over, the server executes this:
public void finishGameClient ()
{
Network.RemoveRPCs (networkPlayer);
Network.DestroyPlayerObjects (networkPlayer);
rpcScript.sendFinishClientGame (networkPlayer);
}
As a result, all game objects are destroyed on both the server and client, and the lobby menu is showed.
However, a message appears: “no objects for the given player ID were deleted 1”.
And if the client leaves the server and rejoins, the game objects reappear at the center of the screen and blink.
I don’t understand. Doesn’t that function remove all buffered calls to remote instantiation?