docs.unity3d.com
    Show / Hide Table of Contents

    Struct MigrationDescription<TVersion, TTarget>

    Describe migration steps to perform when upgrading from one version of an object to another.

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

    An enum identifying the version.

    TTarget

    The type to migrate.

    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)

    Execute a migration step.

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

    Target.

    TVersion stepVersion

    Step version.

    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
    Terms of use
    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