/// <inheritdoc /> public override void OnLocaleChanged(Locale locale) { foreach (var table in m_Tables) { foreach (var asyncOperation in table.Value) { Addressables.ReleaseAsset(asyncOperation.Value.Result); asyncOperation.Value.Release(); } } m_Tables.Clear(); if (m_PreloadOperation != null) { // TODO: Cancel loading operation if it is not completed. m_PreloadOperation.Release(); m_PreloadOperation = null; } }
void OnDisable() { m_PreloadOperation = null; m_Tables.Clear(); }
void OnEnable() { // ScriptableObject properties may persist during runs in the editor, so we reset them here to keep each play consistent. m_PreloadOperation = null; m_Tables.Clear(); }