if (problem) { Get.Solution

I have two scripts that control different things (one controls time, the other controls weather) and they both have some code that is similar, but the weather one doesnt work, the time one does. the time one shows a moon texture depending on the time, and a sun one depending on the time. i have almost the same code in the weather, but at day and night, it displays the night skybox. any help?

512101--18183--$Screen shot 2011-02-28 at 19.19.11 .png512101--18182--$Screen shot 2011-02-28 at 19.19.17 .png

if (posting) Codeblock.use = true;

please… images are hard for quickly looking at, plus cutnpaste, search etc don’t work.

ok

void Start () {
		if (time.hour < 21  time.hour >= 5) {
			RenderSettings.skybox = day;
		}
		
		else if (time.hour >= 21 || time.hour < 5) { 
			RenderSettings.skybox = night;
		}
	}
void OnGUI () {
		if (Time.timeScale == 1) {
			GUI.Box(new Rect(10, 10, 150, 22), now);
		
			if (hour < 21  hour >= 5) {
				GUI.DrawTexture(new Rect(10, 32, 150, 150), dayIm);
			}
			
			else if (hour >= 21 || hour < 5) {
				GUI.DrawTexture(new Rect(10, 32, 150, 150), nightIm);
			}
		}
	}

and it seems to correct itself after it goes through a rain cycle, so the awake function is it

solved