Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
 void UpdateUID()
 {
     m_UID = VNetPlatform.GetUID();
 }