S
S
Shameless192020-03-08 13:25:05
Unity
Shameless19, 2020-03-08 13:25:05

How to connect the game time with the server?

Are there any instructions for very, very dummies, how to connect the game time with the server (in order to protect against insidious hackers-time translators)?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
maxmahsudov, 2020-03-09
@Shameless19

You send to this site www.whattimeisit.com or any other request using web requests https://docs.unity3d.com/ScriptReference/Networkin... Then you write in Google c# work with strings (text) and select that the part you need. Next, DateTime.TryParce(txt) will help you and voila, what you need!

A
Alex Maximovich, 2020-03-09
@flexer1992

With each server response, send a time stamp to the client, and adjust the time on the client accordingly.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question