I was trying to think of a way to get unique IDs without using GUID and thought of this. Just wondering what you all think, if it's safe or not, etc.
// IDGEN: an auto incrementing ID for our nodes public int IDGen; public List<int> IDs; // NEWID: will generate a unique ID for a node. Whenever a node is destroyed // its ID will be put back in the IDs list and reused to ensure we never go over limit public int NewID() { if (IDs.Count > 0) { int i = IDs[0]; IDs.RemoveAt(0); return i; } else { return _.game.IDGen += 1; } }