long A distributed unique id suitable for a table key.
Returns the next distributed unique id.
Combines the current timestamp, the DistributedUIDGenerator.MachineId, and a per-millisecond sequence. The sequence keeps
ids unique and increasing even when the clock moves backwards or several ids are requested within the same
millisecond.
<para>Generate a single id.</para>
using Unity.Localization; using UnityEngine;
namespace Unity.Localization.Samples { public class DistributedUIDGeneratorGetNextKeyExample { public void Run() { var generator = new DistributedUIDGenerator();
long id = generator.GetNextKey();
Debug.Log(id); // a distributed unique id } } }