Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/jackmawer/JacksWorld. An abandoned mini-project that I created while learning to use Unity with networking.
Something went wrong. Try again.
519 B · 18 lines
C#
at master
12345678910111213141516171819using System;using UnityEngine;using System.Collections;
public class ServerTime : MonoBehaviour{ // Update is called once per frame void OnGUI() { GUILayout.BeginArea(new Rect(Screen.width/2-100, 0, 200,30)); GUILayout.Label(string.Format("Time Offset: {0}", PhotonNetwork.networkingPeer.ServerTimeInMilliSeconds - Environment.TickCount)); if (GUILayout.Button("fetch")) { PhotonNetwork.FetchServerTimestamp(); } GUILayout.EndArea(); }}