Struct MigrationDescription<TVersion, TTarget> | High Definition RP | 6.7.1-preview
docs.unity.cn
    Show / Hide Table of Contents

    Struct MigrationDescription<TVersion, TTarget>

    Namespace: UnityEngine.Experimental.Rendering.HDPipeline
    Syntax
    public struct MigrationDescription<TVersion, TTarget>
        where TVersion : struct, IConvertible where TTarget : class, IVersionable<TVersion>
    Type Parameters
    Name Description
    TVersion
    TTarget

    Constructors

    MigrationDescription(MigrationStep<TVersion, TTarget>[])

    Build a migration description.

    Declaration
    public MigrationDescription(params MigrationStep<TVersion, TTarget>[] steps)
    Parameters
    Type Name Description
    MigrationStep<TVersion, TTarget>[] steps

    The step to follow between each version migration.

    Methods

    ExecuteStep(TTarget, TVersion)

    Declaration
    public void ExecuteStep(TTarget target, TVersion stepVersion)
    Parameters
    Type Name Description
    TTarget target
    TVersion stepVersion

    Migrate(TTarget)

    Execute the migration on the provided instance.

    All steps with a version greater than the instance version will be executed in ascending order. Eg: for instance with version 2 and step version 1, 3, 5, and 6. It will execute steps 3 then 5 then 6.

    Declaration
    public bool Migrate(TTarget target)
    Parameters
    Type Name Description
    TTarget target

    The instance to migrate.

    Returns
    Type Description
    Boolean

    True if it has executed migration steps, false otherwise.

    Back to top Copyright © 2020 Unity Technologies
    Generated by DocFX