Download "Sun_new.cs" (<- Right click and Save it in the local folder).
Project Folder: Right click on the "Assets" folder, Create "New Folder", and Rename "Script".
Drag and drop the "Sun_new.cs" into the "Script" folder.
Open MonoDevelop or Visual Studio by double-clicking "Sun_new.cs".
Set an unique name such as student ID after "namespace" in the "Sun_new.cs", and save.
Click DirectionalLight in the Hierarchy, and show the Inspector of the DirectionalLight.
Select [Add Component]-[Scripts]-[Sun_new]
"g" key: Start sun shadow simulation
"t" key: Stop the simulation
You may change parameters such as Latitude, Longitude, Month, and Day etc.
Add [UI]-[Canvas] by right-clicking on Hierarchy
Add [UI]-[Canvas] by right-clicking on [Hierarchy]-[Canvas]
Display the Inspector of the Canvas, Set "Right" and "Top" on the upper-left icon, Set the value as: "PosX=-101, PosY=-101, PosZ=0" and "Width=200, Height=200".
Add [UI]-[Text] by right-clicking on [Hierarchy]-[Canvas]
Rename as "MonthAndDay".
Display the Inspector of the Text, Set "Left" and "Top" on the upper-left icon, Set the value as: "PosX=95, PosY=-24, PosZ=0", "Width=160, Height=40".
Also, Replace the text as "1/1" in the "Text" dialog box, "30" in the "Font Size", and Set pure white color in the "Color" in Text (Script).
Add [UI]-[Text] by right-clicking on [Hierarchy]-[Canvas]
Rename as "Time".
Display the Inspector of the Text, Set "Left" and "Top" on the upper-left icon, Set the value as: "PosX=95, PosY=-56, PosZ=0", "Width=160, Height=40".
Also, Replace the text as "8:00" in the "Text" dialog box, "30" in the "Font Size", and Set pure white color in the "Color" in Text (Script).
Download "MandD.cs" and "WhatTime.cs" (<- Right click and Save them in the local folder).
Drag and drop two scripts (MandD.cs, WhatTime.cs) into the [Script] folder.
Open MonoDevelop or Visual Studio by double-clicking "MandD.cs".
Set an unique name such as student ID after "namespace" in the "MandD.cs", and save.
Open MonoDevelop or Visual Studio by double-clicking "WhatTime.cs".
Set an unique name such as student ID after "namespace" in the "WhatTime.cs", and save.
Display the Inspector of [Canvas]-[MonthAndDay], and Select [Scripts]-[MandD] by clicking [Add Component].
Display the Inspector of [Canvas]-[Time], and Select [Scripts]-[WhatTime] by clicking [Add Component].
"g" key: Start sun shadow simulation
"t" key: Stop the simulation