Unity logo
Cancel
Cart
Applications
Sell Assets

Over 11,000 five-star assets

Rated by 85,000+ customers

Supported by 100,000+ forum members

Every asset moderated by Unity

Home
Tools
Utilities
1/3
Keeps track of the current DateTime regardless of the device system time.
Render pipeline compatibility
The Built-in Render Pipeline is Unity’s default render pipeline. It is a general-purpose render pipeline that has limited options for customization. The Universal Render Pipeline (URP) is a Scriptable Render Pipeline that is quick and easy to customize, and lets you create optimized graphics across a wide range of platforms. The High Definition Render Pipeline (HDRP) is a Scriptable Render Pipeline that lets you create cutting-edge, high-fidelity graphics on high-end platforms.
Unity VersionBuilt-inURPHDRP
6000.0.23f1
Compatible
Compatible
Compatible
2022.3.29f1
Compatible
Compatible
Compatible
Description
  • 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 Example

  • Reward 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.
Technical details
  • 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.

NetworkTimeManager

(not enough ratings)
12 users have favourite this asset
(12)
FREE
13 views in the past week
Quality assets
Over 11,000 five-star assets
Trusted
Rated by 85,000+ customers
Community support
Supported by 100,000+ forum members
Unity logo
Language
Feedback
Partners Program
Partners
USD
EUR
Copyright © 2025 Unity Technologies
All prices are exclusive of tax
USD
EUR