docs.unity.cn
    Show / Hide Table of Contents

    Class DefaultImporter

    Default importer will be the last importer to be called when importing from a file path.

    Inheritance
    Object
    DefaultImporter
    Namespace: UnityEditor.Industrial.Configuring.UI
    Syntax
    [ConfiguratorImporter(-1000000)]
    [UsedImplicitly]
    public class DefaultImporter : IImporter, IFileSystemImporter

    Methods

    ImportAllPaths(IEnumerable<String>)

    Imports all paths.

    Declaration
    public Task<(bool, IEnumerable<Product>)> ImportAllPaths(IEnumerable<string> paths)
    Parameters
    Type Name Description
    IEnumerable<String> paths

    The paths.

    Returns
    Type Description
    Task<ValueTuple<Boolean, IEnumerable<Product>>>

    System.ValueTuple<System.Boolean, IEnumerable<Product>>.

    Implements
    IImporter.ImportAllPaths(IEnumerable<String>)

    ImportFileSystem()

    Imports the file system.

    Declaration
    public Task<IEnumerable<Product>> ImportFileSystem()
    Returns
    Type Description
    Task<IEnumerable<Product>>

    IEnumerable<Product>.

    Implements
    IFileSystemImporter.ImportFileSystem()

    ImportObject(Object, Product)

    Imports the object.

    Declaration
    public Task<(bool, IEnumerable<Product>)> ImportObject(Object obj, Product productSource = null)
    Parameters
    Type Name Description
    Object obj

    The object.

    Product productSource

    The product source.

    Returns
    Type Description
    Task<ValueTuple<Boolean, IEnumerable<Product>>>

    System.ValueTuple<System.Boolean, IEnumerable<Product>>.

    Implements
    IImporter.ImportObject(Object, Product)

    ImportPath(String)

    Import object at path. Will import every prefab as a separate product if a folder path is specified.

    Declaration
    public Task<(bool, IEnumerable<Product>)> ImportPath(string path)
    Parameters
    Type Name Description
    String path

    The path.

    Returns
    Type Description
    Task<ValueTuple<Boolean, IEnumerable<Product>>>

    System.ValueTuple<System.Boolean, IEnumerable<Product>>.

    Implements
    IImporter.ImportPath(String)
    Exceptions
    Type Condition
    Exception

    Could not create path at location: {targetPath}

    OnPostProductImport(Configurator)

    Called when [post product import].

    Declaration
    public void OnPostProductImport(Configurator configurator)
    Parameters
    Type Name Description
    Configurator configurator

    The configurator.

    Implements
    IImporter.OnPostProductImport(Configurator)

    SaveObjectNonPersistentDependencies(Object, Product)

    Saves the object non persistent dependencies.

    Declaration
    public Task<(bool, Object)> SaveObjectNonPersistentDependencies(Object obj, Product productSource = null)
    Parameters
    Type Name Description
    Object obj

    The object.

    Product productSource

    The product source.

    Returns
    Type Description
    Task<ValueTuple<Boolean, Object>>

    System.ValueTuple<System.Boolean, UnityEngine.Object>.

    Implements
    IImporter.SaveObjectNonPersistentDependencies(Object, Product)
    Back to top Copyright © 2020 Unity Technologies
    Generated by DocFX
    on 03 March 2021