public void ToArea(MapArea area) { MapType type = area.GetMapType(); string var1 = "Nothing"; if (type == MapType.Nothing) { Debug.LogError("Not a compatible scene"); } else { switch (type) { case MapType.Bar: var1 = "2DBar"; break; case MapType.Boss: var1 = "2AFight"; break; case MapType.Casino: var1 = "Casino"; break; case MapType.Fight: var1 = "2AFight"; break; case MapType.Dungeon: var1 = "2EDungeon"; break; case MapType.Station: var1 = "Station"; break; } } bartender.currentType = type; bartender.ID = area.ID; LevelManager level = GetComponent <LevelManager>(); level.LoadLevel(var1); }