protected virtual void OnDestroy() { if (this.netObjectID.HasValue) { NetObject.netObjectFromId.Remove(this.netObjectID.Value); GNetworkManager.RecycleNetObjectID(this.netObjectID.Value); } }
public static void AssignNetObjectID(int id) { if (GNetworkManager.idRequests.Count > 0) { IdRequestHandler idRequest = GNetworkManager.idRequests.Dequeue(); if (idRequest.Target != null) { idRequest(id); } else { GNetworkManager.RecycleNetObjectID(id); } } }
protected virtual void Awake() { GNetworkManager.RequireNetObjectID(this.SetID); }