docs.unity3d.com
    Show / Hide Table of Contents

    Interface IDataConverter

    Interface for converting data. This can be used to provide a custom encryption strategy for asset bundles.

    Namespace: UnityEngine.ResourceManagement.ResourceProviders
    Syntax
    public interface IDataConverter

    Methods

    CreateReadStream(Stream, String)

    Create a stream for transforming converted data back into the format that is expected by the player. This method will be called at runtime.

    Declaration
    Stream CreateReadStream(Stream input, string id)
    Parameters
    Type Name Description
    Stream input

    The converted data to transform.

    String id

    The id of the stream, useful for debugging..

    Returns
    Type Description
    Stream

    Stream that transforms the input data. For best performance, this stream should support seeking. If not, a full memory copy of the data must be made.

    CreateWriteStream(Stream, String)

    Create a stream for converting raw data into a format to be consumed by the game. This method will be called by the build process when preparing data.

    Declaration
    Stream CreateWriteStream(Stream input, string id)
    Parameters
    Type Name Description
    Stream input

    The raw data to convert.

    String id

    The id of the stream, useful for debugging.

    Returns
    Type Description
    Stream

    Stream that converts the input data.

    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