void OnEnable() { Texture2D tex = Resources.Load <Texture2D> ("WorldMapArea"); if (tex != null) { worldColors = tex.GetPixels32(); tmp = new Color32[worldColors.Length]; tw = tex.width; th = tex.height; worldTex = new Texture2D(tw, th, TextureFormat.RGBA32, false); } downloads = new DownloadSlot[MAX_CONCURRENT_DOWNLOADS]; map = WorldMapGlobe.instance; countryNames = map.GetCountryNames(true); ti = new TileInfo(0, 0, 0, 0, null); numTiles = GetNumberOfTiles(); GetDownloadedTilesCount(); }