docs.unity3d.com
    Show / Hide Table of Contents

    Struct MigrationStep<TVersion, TTarget>

    Define a migration step.

    Namespace: UnityEngine.Rendering.HighDefinition
    Syntax
    public struct MigrationStep<TVersion, TTarget> : IEquatable<MigrationStep<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

    MigrationStep(TVersion, Action<TTarget>)

    Create a new migration step.

    Declaration
    public MigrationStep(TVersion version, Action<TTarget> action)
    Parameters
    Type Name Description
    TVersion version

    The version of the step.

    Action<TTarget> action

    The migration action to perform.

    Fields

    Version

    The version of the step.

    Declaration
    public readonly TVersion Version
    Field Value
    Type Description
    TVersion

    Methods

    Equals(MigrationStep<TVersion, TTarget>)

    Evaluate equality between migration steps.

    Declaration
    public bool Equals(MigrationStep<TVersion, TTarget> other)
    Parameters
    Type Name Description
    MigrationStep<TVersion, TTarget> other

    Other step to evaluate.

    Returns
    Type Description
    Boolean

    True when the steps are equals.

    Migrate(TTarget)

    Migrate the instance for this step and set the version of the instance to this version.

    If the instance has a version greater or equal to the step one, nothing will be applied.

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

    The instance to migrate.

    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