Exemplo n.º 1
0
        /// <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;
            }
        }
Exemplo n.º 2
0
 void OnDisable()
 {
     m_PreloadOperation = null;
     m_Tables.Clear();
 }
Exemplo n.º 3
0
 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();
 }