This page has been translated automatically.
Video Tutorials
Interface
Essentials
Advanced
How To
Professional (SIM)
UnigineEditor
Interface Overview
Assets Workflow
Settings and Preferences
Working With Projects
Adjusting Node Parameters
Setting Up Materials
Setting Up Properties
Lighting
Landscape Tool
Sandworm
Using Editor Tools for Specific Tasks
Extending Editor Functionality
Built-in Node Types
Nodes
Objects
Effects
Decals
Light Sources
Geodetics
World Nodes
Sound Objects
Pathfinding Objects
Players
Programming
Fundamentals
Setting Up Development Environment
Usage Examples
C++
C#
UnigineScript
UUSL (Unified UNIGINE Shader Language)
Plugins
File Formats
Materials and Shaders
Rebuilding the Engine Tools
GUI
Double Precision Coordinates
API
Containers
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Objects-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
IG Plugin
CIGIConnector Plugin
Rendering-Related Classes
Content Creation
Content Optimization
Materials
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Tutorials
Warning! This version of documentation is OUTDATED, as it describes an older SDK version! Please switch to the documentation for the latest SDK version.
Warning! This version of documentation describes an old SDK version which is no longer supported! Please upgrade to the latest SDK version.

Importer Class

Warning
The scope of applications for UnigineScript is limited to implementing materials-related logic (material expressions, scriptable materials, brush materials). Do not use UnigineScript as a language for application logic, please consider C#/C++ instead, as these APIs are the preferred ones. Availability of new Engine features in UnigineScript (beyond its scope of applications) is not guaranteed, as the current level of support assumes only fixing critical issues.
Warning
The functionality described in this article is not available in the Community SDK edition.
You should upgrade to Engineering / Sim SDK edition to use it.

This class is used to manage a file importer. File importers are used by the Engine's import system to bring the data stored in various non-native formats to UNIGINE. Each importer can be used to import multiple file formats, but there shouldn't be two or more importers registered for a single file format.

Importer Class

Members


int containsParameter ( String name ) #

Returns a value indicating whether the list of import parameters includes a parameter with a given name.

Arguments

Return value

1 if the list of import parameters includes a parameter with a given name; otherwise, 0.

void setParameterInt ( String name, int v ) #

Sets a new value for the specified integer parameter. There are built-in parameters that can also be used in custom importers.

Arguments

  • String name - Name of the integer parameter.
  • int v - New value to be set.

int getParameterInt ( String name ) #

Returns the current value of the specified integer parameter. There are built-in parameters that can also be used in custom importers.

Arguments

  • String name - Name of the integer parameter.

Return value

Value of the integer parameter.

void setParameterFloat ( String name, float v ) #

Sets a new value for the specified float parameter. There are built-in parameters that can also be used in custom importers.

Arguments

  • String name - Name of the float parameter.
  • float v - New value to be set.

float getParameterFloat ( String name ) #

Returns the current value of the specified float parameter. There are built-in parameters that can also be used in custom importers.

Arguments

  • String name - Name of the float parameter.

Return value

Value of the float parameter.

void setParameterDouble ( String name, double v ) #

Sets a new value for the specified double parameter.

Arguments

  • String name - Name of the double parameter.
  • double v - New value to be set.

double getParameterDouble ( String name ) #

Returns the current value of the specified double parameter.

Arguments

  • String name - Name of the double parameter.

Return value

Value of the double parameter.

void setParameterString ( String name, String v ) #

Sets a new value for the specified string parameter. There are built-in parameters that can also be used in custom importers.

Arguments

  • String name - Name of the string parameter.
  • String v - New value to be set.

const char * getParameterString ( String name ) #

Returns the current value of the specified string parameter. There are built-in parameters that can also be used in custom importers.

Arguments

  • String name - Name of the string parameter.

Return value

Value of the string parameter.

int addPreProcessor ( String type_name ) #

Adds an import pre-processor with a given name. There are built-in pre-processors that can also be added to custom importers.

Arguments

  • String type_name - Pre-processor name.

Return value

1 if the specified import pre-processor is successfully added; otherwise, 0.

void removePreProcessor ( String type_name ) #

Removes an import pre-processor with a given name. There are built-in pre-processors that can also be added to custom importers.

Arguments

  • String type_name - Pre-processor name.

int addPostProcessor ( String type_name ) #

Adds an import post-processor with a given name. There are built-in post-processors that can also be added to custom importers.

Arguments

  • String type_name - Post-processor name.

Return value

1 if the specified import post-processor is successfully added; otherwise, 0.

void removePostProcessor ( String type_name ) #

Removes an import post-processor with a given name. There are built-in post-processors that can also be added to custom importers.

Arguments

  • String type_name - Post-processor name.

int init ( String filepath, int flags ) #

Initializes the importer for the specified file using the given flags. Import flags specify which scene components are to be imported.

Arguments

  • String filepath - Path to a file to be imported.
  • int flags - Set of import flags. Any combination of IMPORT_* flags, or ~0 to set all of them.

Return value

1 if the importer was initialized successfully; otherwise, 0.

int import ( String output_path ) #

Imports the contents of the input file to the specified output path.

Arguments

  • String output_path - Output path.

Return value

1 if the contents of the input file are successfully imported to the specified output path; otherwise, 0.
Last update: 2022-03-10
Build: ()