NetworkTimeManager
Bytenado
$0.0
(no ratings)
Date |
Price |
---|---|
日時 |
価格($) |
10/26(2024) |
0.0 |
11/14(2024) |
0.0 |
Jump AssetStore
Keeps track of the current DateTime regardless of the device system time.Gets the time from a designated and official time server on the internet.The time is resynchronized if the device system time changes or if the app is paused for too long.Debug log messages and warnings can be disabled and are excluded from final builds.Included in ExampleReward buttons on timers.Claim a reward early playing a simulated ad.Times for reward claims are saved to a binary file with the bits flipped.A connecting message when the network time is not in sync.Network settings can be changed using const member variables in the NetworkTimeManager script, such as the wait time between NTP server requests and the allowed seconds an app can be paused before resyncing the network time.Getting the time from an NTP server is done on a coroutine and asynchronously.The network time value is updated each frame.A single PlayerPref string saves the next request times for each NTP server to prevent too many consecutive requests.Exceptions are caught, logged, and handled.