private void OnDestroy() { if (Application.isPlaying) { if (tile) { tile.Exit(this); } } }
private void OnDestroy() { if (Application.isPlaying) { if (City) { City.Remove(this); } if (tile) { tile.Exit(this); } if (Config.Temporary != null && Config.Temporary.selectedUnit == this) { Config.Temporary.selectedUnit = null; CanvasLayerInGame.RefreshSelectedTile(); } } }