/// <summary> /// Sync only. /// </summary> public void UnloadSafely(Action callback = null) { SaveAsNeeded(callback); clearentities(); if (FCO != null) { OwningRegion.RemoveChunkQuiet(FCO); FCO = null; } OwningRegion.RemoveCloudsFrom(this); }
/// <summary> /// Safely unload the chunk. /// </summary> /// <param name="callback">Callback for when it's fully saved and unloaded.</param> public void UnloadSafely(Action callback = null) { SaveAsNeeded(callback); Clearentities(); if (FCO != null) { OwningRegion.RemoveChunkQuiet(FCO); FCO = null; } OwningRegion.ForgetChunkForUpperArea(WorldPosition); OwningRegion.RemoveCloudsFrom(this); }