public void DeconstructionComplete(GameObject gameObject) { NitroxId id = NitroxEntity.GetId(gameObject); DeconstructionCompleted deconstructionCompleted = new DeconstructionCompleted(id); packetSender.Send(deconstructionCompleted); // When deconstructed, some objects are simply hidden and potentially re-used later (such as windows). // We want to detach the nitrox entity so a new one can potentially be attached layer NitroxEntity.RemoveFrom(gameObject); }
public void Destroy() { ErrorMessage.AddMessage($"{PlayerName} left the game."); NitroxEntity.RemoveFrom(Body); Object.DestroyImmediate(Body); }