A static class in Root.Township, Alta.Saving.
Static cache of the savable components (ISavableSaveBase) on each network entity, so saving doesn't call GetComponents every time. Extra savables can be added by hand.
Fields
1 private and internal field
Methods
| Member | What it is |
|---|
static void DeregisterAdditional(NetworkEntity entity, ISavableSaveBase savable) | Removes a savable from an entity's list. |
static IEnumerable<ISavableSaveBase> GetFor(NetworkEntity entity) | Gets an entity's savables, finding its components and caching them the first time; dropped when the entity is destroyed. |
static void RegisterAdditional(NetworkEntity entity, ISavableSaveBase savable) | Adds a savable to the entity's list that isn't one of its components. |
2 private and internal methods
| Member | What it is |
|---|
private static void RemoveFromSavablesMap(NetworkEntity entity, bool isUnload) | Drops an entity's cached list when it is destroyed. |
private static List<ISavableSaveBase> ToList(NetworkEntity entity, IEnumerable<ISavableSaveBase> existing) | Swaps an entity's cached array for a list so it can be changed. |