Version: 
PiXYZ Plugin for Unity
Scripting API Documentation
Importer

Public Member Functions

void run ()
 

Public Attributes

ProgressedCallback progressed
 
ImportCompletedCallback completed
 

Properties

static ImportedModel LatestModelImportedObject [get]
 
static string LatestModelImportedPath [get]
 
string filePath [get, set]
 
bool isAsynchronous [get, set]
 
bool printMessageOnCompletion [get, set]
 
ImportSettings importSettings [get, set]
 

Detailed Description

This class can be used in the editor as well as in runtime.

Warning
Make sure the platform on which you are willing to use this is compatible in the manual.

Member Function Documentation

◆ run()

void run ( )

Starts importing the file.

Can be executed only once per Importer instance.

Freezing the ImportSettings, and eventually change some settings depending on context For example,

  • Ensures it's not making LODs and doing some tree processing if file is .pxz
  • Ensures it's not loading metadata if there is some tree processing
  • Loads default shader if not override shader is specified

Member Data Documentation

◆ completed

Callback function triggered when the importer has finished importing.

In Async mode, this callback is triggered only when everything is finished. Always occurs in the main thread.

◆ progressed

ProgressedCallback progressed

Callback function triggered everytime the importer has progressed.

Always occurs in the main thread.

Property Documentation

◆ filePath

string filePath
getset

The file to import

◆ importSettings

ImportSettings importSettings
getset

Returns the ImportSettings reference

◆ isAsynchronous

bool isAsynchronous
getset

[Default is True] If set to true, the import process will run as much as it can on different threads than the main one, so that it won't freeze the Editor/Application and performances are kept to the maximum.

In Asynchronous mode, it is recommended to use callback methods to get information on the import status.

◆ LatestModelImportedObject

ImportedModel LatestModelImportedObject
staticget

The GameObject reference to the latest imported model.

Returns null if no model was imported during this session.

◆ LatestModelImportedPath

string LatestModelImportedPath
staticget

The file path to the latest imported model.

Returns null if no model was imported during this session.

◆ printMessageOnCompletion

bool printMessageOnCompletion
getset

[Default is True] If set to true, the importer will print a message in the console on import completion.