This page has been translated automatically.
视频教程
界面
要领
高级
实用建议
专业(SIM)
UnigineEditor
界面概述
资源工作流程
版本控制
设置和首选项
项目开发
调整节点参数
Setting Up Materials
设置属性
照明
Sandworm
使用编辑器工具执行特定任务
如何擴展編輯器功能
嵌入式节点类型
Nodes
Objects
Effects
Decals
光源
Geodetics
World Nodes
Sound Objects
Pathfinding Objects
Players
编程
基本原理
搭建开发环境
使用范例
C++
C#
UnigineScript
UUSL (Unified UNIGINE Shader Language)
Plugins
File Formats
材质和着色器
Rebuilding the Engine Tools
GUI
双精度坐标
应用程序接口
Animations-Related Classes
Containers
Common Functionality
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
VR-Related Classes
创建内容
内容优化
材质
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Tutorials

Unigine.ImportMaterial 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.

This class represents a container of metadata for an imported material.

ImportMaterial Class

Properties

IntPtr Data#

The metadata of the imported material.

string Name#

The name of the imported material.

string Filepath#

The path to the material's *.mat output file.

Members


ImportMaterial ( ) #

Constructor. Creates an empty ImportMaterial instance.

int GetNumParameters ( ) #

Returns the number of parameters of the imported material.

Return value

Number of material parameters.

vec4 GetParameter ( int index ) #

Returns the value of the material parameter by its index in the list.

Arguments

Return value

Value of the material parameter with the specified index.

string GetParameterName ( int index ) #

Returns the name of the material parameter by its index in the list.

Arguments

Return value

Name of the material parameter with the specified index (if it exists).

void SetParameter ( string name, vec4 value ) #

Sets a new value for the material parameter with the specified name.

Arguments

  • string name - Name of the material parameter.
  • vec4 value - New parameter value to be set.

bool HasParameter ( string name ) #

Returns a value indicating if the material has a parameter with the specified name.

Arguments

  • string name - Name of the material parameter to be checked.

Return value

true if the material has a parameter with the specified name; otherwise false.

void RemoveParameter ( string name ) #

Removes a parameter of the imported material by its name.

Arguments

  • string name - Name of the material parameter to be removed.

vec4 GetParameter ( string name ) #

Returns the value of the material parameter with the specified name.

Arguments

  • string name - Material parameter name.

Return value

Material parameter value as a four-component vector.

int GetNumTextures ( ) #

Returns the number of textures used in the imported material.

Return value

Number of textures used in the imported material.

ImportTexture GetTexture ( int index ) #

Returns a texture used in the material by its index.

Arguments

Return value

Material texture with the specified index.

string GetTextureName ( int index ) #

Returns the name of the texture with the specified index.

Arguments

Return value

Name of the material texture with the specified index.

void SetTexture ( string name, ImportTexture value ) #

Sets a new imported texture to be used for the material texture with the specified name.

Arguments

  • string name - Material texture name.
  • ImportTexture value - New texture to be set.

ImportTexture GetTexture ( string name ) #

Returns a texture used in the material by its name.

Arguments

  • string name - Material texture name.

Return value

Imported texture currently set as the specified material texture.

bool HasTexture ( string name ) #

Returns a value indicating if the material has a texture with the specified name.

Arguments

  • string name - Texture name to be checked.

Return value

true if the material has a texture with the specified name; otherwise false.

void RemoveTexture ( string name ) #

Removes a texture of the imported material by its name.

Arguments

  • string name - Name of the material texture to be removed.
Last update: 2024-04-19
Build: ()