Example #1
0
    public void TrackAsyncDone(System.Object handle, UnityEngine.Object target)
    {
        if (!_enableTracking || target == null)
        {
            return;
        }

        AssetRequestInfo request;

        if (!InProgressAsyncObjects.TryGetValue(handle, out request))
        {
            return;
        }

        request.requestType = ResourceRequestType.Async;
        TrackRequestWithObject(request, target);
        InProgressAsyncObjects.Remove(handle);

#if JX3M
        ResourceHandle h = handle as ResourceHandle;
        if (h != null)
        {
            LoadingStats.Instance.LogAsync(request.resourcePath, (Time.time - h.StartTime) * 1000.0f);
        }
#else
        LoadingStats.Instance.LogAsync(request.resourcePath, 0.0f);
#endif
    }
    public void TrackAsyncDone(System.Object handle, UnityEngine.Object target)
    {
        ResourceRequestInfo request;

        if (!InProgressAsyncObjects.TryGetValue(handle, out request))
        {
            return;
        }

        request.requestType = ResourceRequestType.Async;
        TrackRequestWithObject(request, target);
        InProgressAsyncObjects.Remove(handle);
    }