void OnMarkForCloseOnClient(MyEntity entity)
        {
            // MyEntity.Close() on client should not be called, except when REPLICABLE_DESTROY is received from server

            // When entity is being closed correctly on client:
            // Close() is called from OnDestroy() which is called by ReplicationClient after entity is removed from replication.
            // Therefore we shouldn't be able to get it's network ID.
            if (MyMultiplayer.Static == null)
            {
                return;
            }
            var obj = MyMultiplayer.Static.ReplicationLayer.GetProxyTarget(m_proxy);

            NetworkId netId;

            if (MySession.Static.Ready && obj != null && MyMultiplayer.Static.ReplicationLayer.TryGetNetworkIdByObject(obj, out netId))
            {
                Debug.Fail("Deleting entity, but network object is still there! Close called by client?" + MyEnvironment.NewLine + m_proxy.ToString());
            }
        }