/// \endcond /// \cond public override void ShutdownCubiquityVolume() { if (!IsVolumeHandleNull()) { // We only save if we are in editor mode, not if we are playing. bool saveChanges = (!Application.isPlaying) && (writePermissions == WritePermissions.ReadWrite); if (saveChanges) { CommitChanges(); } else { DiscardChanges(); } CubiquityDLL.DeleteVolume(volumeHandle.Value); volumeHandle = null; } }
/// \endcond /// \cond public override void ShutdownCubiquityVolume() { // Shutdown could get called multiple times. E.g by OnDisable() and then by OnDestroy(). if (!IsVolumeHandleNull()) { // We only save if we are in editor mode, not if we are playing. bool saveChanges = (!Application.isPlaying) && (writePermissions == WritePermissions.ReadWrite); if (saveChanges) { CommitChanges(); } else { DiscardChanges(); } CubiquityDLL.DeleteVolume(volumeHandle.Value); volumeHandle = null; } }