public void setSun() //Sets sun to the current postion given latitude, longitude, and time { if (Sun != null) { double[] ZenAzi = getZenithAndAzimuth(); //Debug.LogFormat("'{0}:{1}','{2}:{3}'", ZenAzi[0], MathD.HasValue(ZenAzi[0]), ZenAzi[1], MathD.HasValue(ZenAzi[1])); //Debug.Log(datetime); //Debug.LogFormat("{0}: {1}, {2}", datetime, ZenAzi[0], ZenAzi[1]); if (MathD.HasValue(ZenAzi[0]) && MathD.HasValue(ZenAzi[1])) { Sun.transform.localEulerAngles = new Vector3((float)ZenAzi[0], (float)ZenAzi[1], 0); } if (timeText != null) { timeText.text = datetime.ToString(); } } }