void CaptureFrame(ref AssetBundleContext context)
        {
            context.ProfilerData.DataCount++;

            FrameProfilerData currentframedata = new FrameProfilerData();

            currentframedata.Frame = Time.frameCount;
            var scene = SceneManager.GetActiveScene();

            currentframedata.Scene = scene.name;

            //tasks
            for (int i = 0; i < context.Tasks.Count; i++)
            {
                var task = context.Tasks[i];
                currentframedata.AddCopyTask(ref task);
            }

            //Historyx
            var allassetbundles = context.Cache.GetAllAssetBundle();

            foreach (var kv in allassetbundles)
            {
                var gameassetbundle = kv.Value;

                AssetBundleHistory history = new AssetBundleHistory();

                history.AddObjectRef(ref gameassetbundle);

                currentframedata.AddHistory(ref history);
            }

            context.ProfilerData.Add(ref currentframedata);
        }
        public void AddHistory(ref AssetBundleHistory history)
        {
            if (Histories == null)
            {
                Histories = ListPool <AssetBundleHistory> .Get();
            }

            Histories.Add(history);

            UserRefCount += history.UserRefCount;
            RefCount     += history.ObjectReferences == null ? 0 : history.ObjectReferences.Count;
        }