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
ConfigureFunctionLogger
[HandleProcessCorruptedStateExceptions]public void ConfigureFunctionLogger(string functionName, bool enableFunction, bool enableParameters, bool enableExecutionTime)
Parameters
Type | Name | Description |
|---|
| string | functionName | |
| bool | enableFunction | |
| bool | enableParameters | |
| bool | enableExecutionTime | |
AddAssetPaths
Add directory paths to search assets in.
[HandleProcessCorruptedStateExceptions]public void AddAssetPaths(StringList path)
Parameters
Type | Name | Description |
|---|
| StringList | path | The 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 |
|---|
| string | filePath | The (relative) file path to search for. |
Returns
GetAssetPaths
Get user defined paths to find assets.
[HandleProcessCorruptedStateExceptions]public StringList GetAssetPaths()
Returns
SetAssetPaths
Replace paths to find assets.
[HandleProcessCorruptedStateExceptions]public void SetAssetPaths(StringList assetPaths)
Parameters
Type | Name | Description |
|---|
| StringList | assetPaths | The asset paths. |
ApplyAutoTessellate
Handle auto tessellate options on given part, need to be complete.
[HandleProcessCorruptedStateExceptions]public void ApplyAutoTessellate(uint part)
Parameters
Type | Name | Description |
|---|
| uint | part | Part to be auto tessellated. |
ExportScene
Export a file.
[HandleProcessCorruptedStateExceptions]public void ExportScene(string fileName, uint root = 0)
Parameters
Type | Name | Description |
|---|
| string | fileName | Path of the file to export. |
| uint | root | Identifier 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 |
|---|
| string | fileName | Path of the file to export. |
| bool | keepIntermediaryNodes | If 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 |
|---|
| bool | forRuntimeOS | Get format for the current OS or for all. |
Returns
GetFormatsDescriptions
Give all the formats description that can be imported/exported in Pixyz.
[HandleProcessCorruptedStateExceptions]public FileFormatList GetFormatsDescriptions(bool forRuntimeOS = true)
Parameters
Type | Name | Description |
|---|
| bool | forRuntimeOS | Get format for the current OS or for all. |
Returns
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 |
|---|
| bool | forRuntimeOS | If true, gets formats for the current OS. If false, gets for all supported OSes. |
Returns
ImportFiles
Import files.
[HandleProcessCorruptedStateExceptions]public OccurrenceList ImportFiles(FilesList fileNames, uint root = 0)
Parameters
Type | Name | Description |
|---|
| FilesList | fileNames | List of files's paths to import. |
| uint | root | Identifier of the destination occurrence. |
Returns
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 |
|---|
| string | filename | Path of the file to import. |
| uint | root | Identifier of the destination occurrence. |
Returns
ImportRemote3mxFile
Import a remote 3mx file.
[HandleProcessCorruptedStateExceptions]public uint ImportRemote3mxFile(string filePath, string origin = "", uint root = 0)
Parameters
Type | Name | Description |
|---|
| string | filePath | The path of the temp file. |
| string | origin | Remote origin of the file. |
| uint | root | Identifier of the destination occurrence. |
Returns
ImportScene
Import a file.
[HandleProcessCorruptedStateExceptions]public uint ImportScene(string fileName, uint root = 0)
Parameters
Type | Name | Description |
|---|
| string | fileName | Path of the file to import. |
| uint | root | Identifier of the destination occurrence. |
Returns
ListVariants
List all variants if file.
[HandleProcessCorruptedStateExceptions]public VariantNameList ListVariants(string fileName)
Parameters
Type | Name | Description |
|---|
| string | fileName | Path of the file to import. |
Returns
LoadReferencedData
Load partial model.
[HandleProcessCorruptedStateExceptions]public void LoadReferencedData(uint component, bool recursively)
Parameters
Type | Name | Description |
|---|
| uint | component | The component to load. |
| bool | recursively | Load it recursively or not. |
UnloadReferencedData
Unload partial model.
[HandleProcessCorruptedStateExceptions]public void UnloadReferencedData(uint component)
Parameters
Type | Name | Description |
|---|
| uint | component | The component to unload. |
RegisterIOCallbacks
Register import and export callbacks.
[HandleProcessCorruptedStateExceptions]public void RegisterIOCallbacks(string name, IOInterface.importFileCallback importCallback, IOInterface.exportFileCallback exportCallback, FileFormatList fileFormats)
Parameters
SplitPointCloud
[HandleProcessCorruptedStateExceptions]public void SplitPointCloud(FilePathList files, string outputDirectory, double minVoxSize, bool useKDTree, AABB aabb = null, double density = -1)
Parameters
Type | Name | Description |
|---|
| FilePathList | files | Path of the point cloud files to process. |
| string | outputDirectory | Output directory. |
| double | minVoxSize | Size of minimum leaves (mm). |
| bool | useKDTree | If true, uses a kd_tree, otherwise, uses an octree. |
| AABB | aabb | Global scene aabb. |
| double | density | Point 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 |
|---|
| string | extensionName | The name of the extension. |
Returns