This page has been translated automatically.
视频教程
界面
要领
高级
实用建议
UnigineEditor
界面概述
资产工作流程
设置和首选项
项目开发
调整节点参数
Setting Up Materials
Setting Up Properties
照明
Landscape Tool
Sandworm
使用编辑器工具执行特定任务
Extending Editor Functionality
嵌入式节点类型
Nodes
Objects
Effects
Decals
光源
Geodetics
World Nodes
Sound Objects
Pathfinding Objects
Players
编程
基本原理
搭建开发环境
Usage Examples
C++
C#
UnigineScript
UUSL (Unified UNIGINE Shader Language)
Plugins
File Formats
Rebuilding the Engine Tools
GUI
双精度坐标
应用程序接口
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 Optimization
Materials
Art Samples
Tutorials

Import Class

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.
Header: #include <UnigineImport.h>

This is an import manager class. It is used to create and manage importers, processors as well as to directly import files in non-native formats, if an importer for such files was previously registered.

You can manage the set of available importers dynamically by adding them to or removing from the registry.

You can also get the list of all currently supported file extensions.

Import Class

Members


Import ( ) #

Constructor. Creates an importer with default settings.

Import * get ( ) #

Returns a pointer to the Import manager.

Return value

Import manager instance.

void registerImporter ( const char* type_name ) #

Registers a new importer with a given name.

Arguments

  • const char* type_name - Importer type name.

bool unregisterImporter ( const char* type_name ) #

Unregisters the specified importer type.

Arguments

  • const char* type_name - Importer type name.

Return value

true if a given importer type was successfully unregistered; otherwise, false.

Importer * createImporter ( const char* type_name ) const#

Creates a new importer of the specified type.
Notice
The importer type name specified must be previously registered.

Arguments

  • const char* type_name - Importer type name.

Return value

Pointer to a new created importer of a given type, if it was created successfully; otherwise, nullptr.

Importer * createImporterByFileName ( const char* file_name ) const#

Creates an importer for the input file with a given name by its extension, if such an importer was previously registered.

Arguments

  • const char* file_name - Name of the input file containing the data to be imported.

Return value

Pointer to the importer, if it was successfully created for the file with a given name; otherwise, nullptr.

void registerImportProcessor ( const char* type_name ) #

Registers a new import processor with a given name.

Arguments

  • const char* type_name - Import processor type name.

bool unregisterImportProcessor ( const char* type_name ) #

Unregisters the specified import processor type.

Arguments

  • const char* type_name - Import processor type name.

Return value

true if a given import processor type was successfully unregistered; otherwise, false.

ImportProcessor * createImportProcessor ( const char* type_name ) #

Creates a new import processor of the specified type.
Notice
The processor type name specified must be previously registered.

Arguments

  • const char* type_name - Import processor type name.

Return value

Pointer to a new created import processor of a given type if it was created successfully; otherwise, nullptr.

bool isSupportedExtension ( const char* extension ) const#

Returns a value indicating whether the specified file extension is supported by the importer.

Arguments

  • const char* extension - Null-terminated string with file extension to be checked.

Return value

true if the specified file extension is supported by the importer; otherwise, false.

Vector<String> & getSupportedExtensions ( ) const#

Returns the list of all supported file extensions as a vector of strings.

Return value

List of all supported extensions as a vector of strings.

void getSupportedExtensions ( Vector<String> & extensions ) const#

Returns the list of all supported file extensions and puts it to the given vector.

Arguments

  • Vector<String> & extensions - Vector to put the list of all supported extensions to.

String getImporterTypeByExtension ( const char* extension ) const#

Returns the type of importer for the specified extension.

Arguments

  • const char* extension - Null-terminated string with file extension.

Return value

Type of importer for the specified extension, if it exists, as a string; otherwise, null string.

void getImporterTypes ( Vector<String> & types ) const#

Returns the list of all importer types registered by the Import Manager and puts it to the given vector.

Arguments

  • Vector<String> & types - Vector to put the list of all registered importer types to.

Vector<String> & getImporterTypes ( ) const#

Returns the list of all importer types registered by the Import Manager.

Return value

List of all importer types registered by the Import Manager as a vector of strings.

bool import ( const char* filepath, const char* output_path, String& out_filepath ) const#

Imports the contents from the specified input file to the specified output path and puts the path to the resulting output file to out_filepath.

Arguments

  • const char* filepath - Path to an input file containing the data to be imported.
  • const char* output_path - Output path to be used to store generated file(s) with imported data.
  • String& out_filepath - Path to the resulting output file.

Return value

true if the specified input file is imported successfully; otherwise, false.

bool containsImportProcessor ( const char* type_name ) const#

Checks if the specified import processor type exists.

Arguments

  • const char* type_name - Import processor type name.

Return value

true if a given import processor type exists; otherwise, false.
Last update: 2021-08-24
Build: ()