Page 1 of 1

What time system does Unity games use? cant find this clock

Posted: Fri Feb 15, 2019 2:34 am
by reidlos65
So I am slowly learning various parts of CE, but just as I make progress on one thing i go back a few steps because the next thing I want to mess with I cant find in step 1(finding the initial values etc)

In this case its a game that has a clock that progresses through a game "day" its shown as if it was hours:mins BUT the hours is actual real time min and minutes are realtime seconds

so you will have 11:15AM and in 45 seconds it will be 12:00PM

I have tried using the standard increase/decrease value run around, and tried to convert the time into float/double and 4byte so 11:15AM being

674 to 675
or milseconds @ 674000 to 676000

no luck Sad

Any hints? Its an early locked Alpha game that is basically similar to Stardew vally/harvestmoon,runefactory called Re:Legend

Re: What time system does Unity games use? cant find this clock

Posted: Fri Feb 15, 2019 3:20 am
by TimFun13
It's mostly just time consuming. Start in the day time with an unknown value scan (as int or float), then just keep scanning for increased value tell nightfall then wait till morning and scan for a decreased value; and repete for a few in game days.

But if this is online or co-op, it might be server side to keep it synced for all players.

Re: What time system does Unity games use? cant find this clock

Posted: Fri Feb 15, 2019 3:49 am
by reidlos65
Just single player, did several methods to narrow it down, but none of the expressed floats relate (to my understanding) to the time displayed ;/

Update: found somthing that atleast stops the visual timer, its a double float. Value shared with alot in my seach but decided to add all 26 to a list and freeze all. ONE worked so narrowed it down.

Re: What time system does Unity games use? cant find this clock

Posted: Fri Feb 15, 2019 4:19 am
by vosszaa
OOT, how does one play this game? It looks interesting

Re: What time system does Unity games use? cant find this clock

Posted: Fri Feb 15, 2019 4:24 am
by reidlos65
[Link]
by chance does anyone here know how these might relate. I know this TIME value freezes that clock but how that value turns into that time im missing somthing. 4 hours in game go by and 4.375 XXX dont change

also here is the instruction set. Bit more complicated then the nooby starter stuff I THINK but [Link]

Re: What time system does Unity games use? cant find this clock

Posted: Fri Feb 15, 2019 4:25 am
by reidlos65
vosszaa wrote:
Fri Feb 15, 2019 4:19 am
OOT, how does one play this game? It looks interesting
Right now its in kickstarter locked early alpha, so keys only sent to backers. :(

Re: What time system does Unity games use? cant find this clock

Posted: Sun Feb 24, 2019 9:25 am
by igromanru
If it's an Unity game, you can decompile Assembly-CSharp.dll with dnSpy, find out what exactly they are doing with the time or anything else you want and use CE Mono feature to find the right place in the code in CE:

Re: What time system does Unity games use? cant find this clock

Posted: Sun Feb 24, 2019 9:32 am
by Csimbi
Unity provides an internal class, [Link].
Have a look at that class - most Unity games use this class.

Then, have a look at [Link] article on time management.

Hope that helps!