docs.unity.cn
    Show / Hide Table of Contents

    Constructor ContentDownloadService

    ContentDownloadService(String, String, Int32, Int32, Func<ContentDownloadService.DownloadOperation>)

    Construct a download service.

    Declaration
    public ContentDownloadService(string name, string cacheDir, int priority = 1, int maxActiveDownloads = 5, Func<ContentDownloadService.DownloadOperation> createDownloadOpFunc = null)
    Parameters
    Type Name Description
    String name

    The name of the service. Each name must be unique.

    String cacheDir

    The root directory of the local cache.

    Int32 priority

    The priority of the service. Higher values are placed at the front of the service list.

    Int32 maxActiveDownloads

    The maximum allowed concurrent downloads. When there are more requests than can be run concurrently, they are queued until some of the active operations complete.

    Func<ContentDownloadService.DownloadOperation> createDownloadOpFunc

    Allows for specifying a custom type of DownloadOperation. By default, this will use UnityWebRequest.

    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023