Is it possible to access the time from unity?

Hello.

I read somewhere that unity is unable to access information on the outside of unity itself.
So like, i want to play around with time. Change the directional lights color and rotation based on the time of day in the real world.

Im guessing this has to be based on the time from the computers clock. Can i access the clock from script in unity?

Thank you in advance!

System.DateTime.Now

–Eric

Oh. that easy! Thank you Eric
Could not find that in the API. maybe cuz i was looking in the wrong places…

Thank you though !

It’s not in the Unity docs, it’s part of .NET.

So it is possible to access stuff from the outside of unity! Sweet!

a follow up question is whether you can like, use the actual time as ints ?

Thanx!

Read the MSDN docs (here).

–Eric