Documentation

Support

Asset Transformer SDK


User Manual

Python API

C# API

Changelog

Discussions

Asset Transformer SDK

IOInterface

Class
Read time 5 minutesLast updated 19 hours ago

Inheritance
Inherited Members
Namespace: UnityEngine.Pixyz.IO
public class IOInterface : Interface

Methods

GetLastError

public static string GetLastError()
Returns

Type

Description

string

ConfigureFunctionLogger

[HandleProcessCorruptedStateExceptions]public void ConfigureFunctionLogger(string functionName, bool enableFunction, bool enableParameters, bool enableExecutionTime)
Parameters

Type

Name

Description

stringfunctionName
boolenableFunction
boolenableParameters
boolenableExecutionTime

AddAssetPaths

Add directory paths to search assets in.
[HandleProcessCorruptedStateExceptions]public void AddAssetPaths(StringList path)
Parameters

Type

Name

Description

StringListpathThe paths to add.

ClearAssetPaths

Clear all asset paths.
[HandleProcessCorruptedStateExceptions]public void ClearAssetPaths()

FindInDirectories

Find the final path. This will search for the file in asset paths.
[HandleProcessCorruptedStateExceptions]public string FindInDirectories(string filePath)
Parameters

Type

Name

Description

stringfilePathThe (relative) file path to search for.
Returns

Type

Description

string

GetAssetPaths

Get user defined paths to find assets.
[HandleProcessCorruptedStateExceptions]public StringList GetAssetPaths()
Returns

Type

Description

StringList

SetAssetPaths

Replace paths to find assets.
[HandleProcessCorruptedStateExceptions]public void SetAssetPaths(StringList assetPaths)
Parameters

Type

Name

Description

StringListassetPathsThe asset paths.

ApplyAutoTessellate

Handle auto tessellate options on given part, need to be complete.
[HandleProcessCorruptedStateExceptions]public void ApplyAutoTessellate(uint part)
Parameters

Type

Name

Description

uintpartPart to be auto tessellated.

ExportScene

Export a file.
[HandleProcessCorruptedStateExceptions]public void ExportScene(string fileName, uint root = 0)
Parameters

Type

Name

Description

stringfileNamePath of the file to export.
uintrootIdentifier of the root occurrence to export.

ExportSelection

Export the selection to a file.
[HandleProcessCorruptedStateExceptions]public void ExportSelection(string fileName, bool keepIntermediaryNodes = false)
Parameters

Type

Name

Description

stringfileNamePath of the file to export.
boolkeepIntermediaryNodesIf true, intermerdiary hierarchy is kept.

GetExportFormats

Give all the format name and their extensions that can be exported in Pixyz.
[HandleProcessCorruptedStateExceptions]public FormatList GetExportFormats(bool forRuntimeOS = true)
Parameters

Type

Name

Description

boolforRuntimeOSGet format for the current OS or for all.
Returns

Type

Description

FormatList

GetFormatsDescriptions

Give all the formats description that can be imported/exported in Pixyz.
[HandleProcessCorruptedStateExceptions]public FileFormatList GetFormatsDescriptions(bool forRuntimeOS = true)
Parameters

Type

Name

Description

boolforRuntimeOSGet format for the current OS or for all.
Returns

Type

Description

FileFormatList

GetImportFormats

Give all the format name and their extensions that can be imported in Pixyz.
[HandleProcessCorruptedStateExceptions]public FormatList GetImportFormats(bool forRuntimeOS = true)
Parameters

Type

Name

Description

boolforRuntimeOSIf true, gets formats for the current OS. If false, gets for all supported OSes.
Returns

Type

Description

FormatList

ImportFiles

Import files.
[HandleProcessCorruptedStateExceptions]public OccurrenceList ImportFiles(FilesList fileNames, uint root = 0)
Parameters

Type

Name

Description

FilesListfileNamesList of files's paths to import.
uintrootIdentifier of the destination occurrence.
Returns

Type

Description

OccurrenceList

ImportPicture

Imports a picture and applies is at as a texture on a 3D plane created in the scene.
[HandleProcessCorruptedStateExceptions]public uint ImportPicture(string filename, uint root = 0)
Parameters

Type

Name

Description

stringfilenamePath of the file to import.
uintrootIdentifier of the destination occurrence.
Returns

Type

Description

uint

ImportRemote3mxFile

Import a remote 3mx file.
[HandleProcessCorruptedStateExceptions]public uint ImportRemote3mxFile(string filePath, string origin = "", uint root = 0)
Parameters

Type

Name

Description

stringfilePathThe path of the temp file.
stringoriginRemote origin of the file.
uintrootIdentifier of the destination occurrence.
Returns

Type

Description

uint

ImportScene

Import a file.
[HandleProcessCorruptedStateExceptions]public uint ImportScene(string fileName, uint root = 0)
Parameters

Type

Name

Description

stringfileNamePath of the file to import.
uintrootIdentifier of the destination occurrence.
Returns

Type

Description

uint

ListVariants

List all variants if file.
[HandleProcessCorruptedStateExceptions]public VariantNameList ListVariants(string fileName)
Parameters

Type

Name

Description

stringfileNamePath of the file to import.
Returns

Type

Description

VariantNameList

LoadReferencedData

Load partial model.
[HandleProcessCorruptedStateExceptions]public void LoadReferencedData(uint component, bool recursively)
Parameters

Type

Name

Description

uintcomponentThe component to load.
boolrecursivelyLoad it recursively or not.

UnloadReferencedData

Unload partial model.
[HandleProcessCorruptedStateExceptions]public void UnloadReferencedData(uint component)
Parameters

Type

Name

Description

uintcomponentThe component to unload.

RegisterIOCallbacks

Register import and export callbacks.
[HandleProcessCorruptedStateExceptions]public void RegisterIOCallbacks(string name, IOInterface.importFileCallback importCallback, IOInterface.exportFileCallback exportCallback, FileFormatList fileFormats)
Parameters

Type

Name

Description

stringnameCallback name.
IOInterface.importFileCallbackimportCallbackCallback that import a file.
IOInterface.exportFileCallbackexportCallbackCallback that exports to a file.
FileFormatListfileFormatsGives the extension and parameters to Import/Export.

SplitPointCloud

[HandleProcessCorruptedStateExceptions]public void SplitPointCloud(FilePathList files, string outputDirectory, double minVoxSize, bool useKDTree, AABB aabb = null, double density = -1)
Parameters

Type

Name

Description

FilePathListfilesPath of the point cloud files to process.
stringoutputDirectoryOutput directory.
doubleminVoxSizeSize of minimum leaves (mm).
booluseKDTreeIf true, uses a kd_tree, otherwise, uses an octree.
AABBaabbGlobal scene aabb.
doubledensityPoint cloud density (-1 to compute).

GetExtensionPriority

Get the priority of an extension from the pixyz importer.
[HandleProcessCorruptedStateExceptions]public PriorityImportLevel GetExtensionPriority(string extensionName)
Parameters

Type

Name

Description

stringextensionNameThe name of the extension.
Returns

Type

Description

PriorityImportLevel