Example #1
0
        internal static void Update()
        {
            // var now = Time.unscaledTime;
            deleteList.Clear();

            var items = removeDic.GetEnumerator();

            while (items.MoveNext())
            {
                var kv = items.Current;
                if (Time.unscaledTime >= kv.Value)
                {
                    deleteList.Add(kv.Key);
                    CacheManager.Unload(kv.Key);
                }
            }

            for (int i = 0; i < deleteList.Count; i++)
            {
                removeDic.Remove(deleteList[i]);
            }
        }