예제 #1
0
파일: VNetUtils.cs 프로젝트: wardinsky/VNet
        static public UInt64 GenerateUIDInEditor()
        {
            VNetTimer timer       = new VNetTimer();
            double    currentTime = timer.GetSystemTimeNow();

            timer = null;

            UInt64 clientID = VNetPlatform.GetUID();
            double seed     = (new Random()).NextDouble();


            UInt64 timeRe = BitConverter.ToUInt64(BitConverter.GetBytes(currentTime), 0);
            UInt64 seedRe = BitConverter.ToUInt64(BitConverter.GetBytes(seed), 0);

            return((clientID ^ timeRe) + seedRe);
        }
예제 #2
0
파일: VNet.cs 프로젝트: wardinsky/VNet
 void UpdateUID()
 {
     m_UID = VNetPlatform.GetUID();
 }