// Use this for initialization void Awake() { rotate = GetComponent <SphereRotate>(); if (rotate == null) { rotate = gameObject.AddComponent <SphereRotate>(); } click = GameObject.CreatePrimitive(PrimitiveType.Sphere); click.GetComponent <SphereCollider>().enabled = false; grid = new SphereGrid(); grid.Init(SphereRadius, SphereDetail); grid.SetRoot(transform); string path = Application.dataPath + "/spheregrid.txt"; if (File.Exists(path)) { string text = File.ReadAllText(path); grid.ParseTilesType(text); } for (int i = 0; i < grid.tiles.Count; ++i) { grid.tiles[i].SetDefaultColor(); } }
void Start() { sphereRot = new SphereRotate(Sphere); gps = new GPS (); inputString = gps.dlat.ToString(); inputString1 = gps.dlon.ToString(); inputString2 = gps.alt.ToString(); }