日本語翻訳ドキュメントはサポートを終了しました

MRTK 2.6 以降のドキュメントについては、公式の Microsoft ドキュメント を参照してください。

    Show / Hide Table of Contents

    Class MigrationTool

    This tool allows the migration of obsolete components into up-to-date versions. In order to be processed by the migration tool, deprecated components require specific implementation of the IMigrationHandler

    Inheritance
    Object
    MigrationTool
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: Microsoft.MixedReality.Toolkit.Utilities
    Assembly: cs.temp.dll.dll
    Syntax
    public class MigrationTool

    Constructors

    MigrationTool()

    Declaration
    public MigrationTool()

    Properties

    MigrationHandlerTypes

    Returns a copy of all loadable implementation types of IMigrationHandler

    Declaration
    public List<Type> MigrationHandlerTypes { get; }
    Property Value
    Type Description
    List<Type>

    MigrationObjects

    Returns a copy of all game objects, prefabs and scene assets selected for migration and their migration status

    Declaration
    public Dictionary<object, MigrationTool.MigrationStatus> MigrationObjects { get; }
    Property Value
    Type Description
    Dictionary<Object, MigrationTool.MigrationStatus>

    MigrationState

    Current migration process state of the tool

    Declaration
    public MigrationTool.MigrationToolState MigrationState { get; }
    Property Value
    Type Description
    MigrationTool.MigrationToolState

    Methods

    ClearMigrationList()

    Clears list of objects to be migrated

    Declaration
    public void ClearMigrationList()

    DrawDeprecated<T, THandler>(T)

    Util method to draw a deprecated warning for a given component in the inspector as well as a button to migrate / trigger the migration tool to upgrade to the new version via the indicated migration handler.

    Declaration
    public static void DrawDeprecated<T, THandler>(T target)
        where T : MonoBehaviour where THandler : IMigrationHandler
    Parameters
    Type Name Description
    T target

    Component to migrate.

    Type Parameters
    Name Description
    T

    Deprecated component type.

    THandler

    Migration handler to call for migrating the component.

    MigrateSelection(Type, Boolean)

    Migrates all objects from list of objects to be migrated using the selected IMigrationHandler implementation.

    Declaration
    public bool MigrateSelection(Type type, bool askForConfirmation)
    Parameters
    Type Name Description
    Type type

    A type that implements IMigrationhandler

    Boolean askForConfirmation
    Returns
    Type Description
    Boolean

    RemoveObjectForMigration(Object)

    Removes object from the list of objects to migrated

    Declaration
    public void RemoveObjectForMigration(object selectedObject)
    Parameters
    Type Name Description
    Object selectedObject

    Object to be removed

    TryAddObjectForMigration(Type, Object)

    Adds selectedObject to the list of objects to be migrated. Return false if the object is not of type GameObject, or SceneAsset.

    Declaration
    public bool TryAddObjectForMigration(Type type, object selectedObject)
    Parameters
    Type Name Description
    Type type
    Object selectedObject
    Returns
    Type Description
    Boolean

    TryAddProjectForMigration(Type)

    Adds all prefabs and scene assets found on the assets folder to the list of objects to be migrated

    Declaration
    public void TryAddProjectForMigration(Type migrationType)
    Parameters
    Type Name Description
    Type migrationType
    Back to top Generated by DocFX