This page has been translated automatically.
视频教程
界面
要领
高级
实用建议
基础
专业(SIM)
UnigineEditor
界面概述
资源工作流程
Version Control
设置和首选项
项目开发
调整节点参数
Setting Up Materials
设置属性
照明
Sandworm
使用编辑器工具执行特定任务
如何擴展編輯器功能
嵌入式节点类型
Nodes
Objects
Effects
Decals
光源
Geodetics
World Nodes
Sound Objects
Pathfinding Objects
Players
编程
基本原理
搭建开发环境
使用范例
C++
C#
UnigineScript
统一的Unigine着色器语言 UUSL (Unified UNIGINE Shader Language)
Plugins
File Formats
材质和着色器
Rebuilding the Engine Tools
GUI
双精度坐标
应用程序接口(API)参考
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

API Migration

Major Changes#

Breaking Changes#

Procedural Mesh Modifications#

Previously, procedural mesh modification in static meshes followed a straightforward but limited workflow:

  1. Enable procedural mode
  2. Assign a new mesh
  3. Apply changes

While simple, this model had constraints that could introduce significant issues in practice.

For example, streaming was not supported for procedural meshes, so they had to be constantly kept in memory. In complex scenarios with large or numerous procedural objects, this could lead to excessive RAM and VRAM usage, and in some cases, even application crashes.

To overcome these limitations, we've significantly extended the procedural mesh API and introduced multiple procedural modes, each optimized for different performance and memory characteristics. These modes allow you to fine-tune behavior: whether you need ultra-fast updates for a small number of objects or efficient memory use via RAM-backed or disk-backed streaming.

Please note that selecting a procedural mode directly impacts streaming and memory usage (RAM, VRAM, and disk). Be sure to understand the details before making your choice.

2.19.1
Source code (C++)
ObjectMeshStaticPtr my_static_mesh;
// ...

// Enable procedural mesh mode for this static mesh object
my_static_mesh->setMeshProceduralMode(true);

// Update the mesh geometry using the provided source_mesh
my_static_mesh->applyMeshProcedural(source_mesh);
2.20
Source code (C++)
ObjectMeshStaticPtr my_static_mesh;
// ...

// Choose one of the appropriate procedural modes
// DYNAMIC, BLOB, FILE or DISABLE
// For example, FILE - for streaming from disk
my_static_mesh->setMeshProceduralMode(ObjectMeshStatic::PROCEDURAL_MODE_FILE);

// Update the source mesh of the "my_static_mesh" object via the source_mesh instance
// More options are available, pick the best for your needs
my_static_mesh->applyMoveMeshProceduralAsync(source_mesh);

For more details on configuration and best practices:

Const-Qualified Engine Types#

To improve code safety and consistency in C++ workflows, a wide range of engine objects now have const-qualified versions.

It allows to explicitly mark references as read-only, ensuring that non-const methods cannot be called on them. This helps improve code clarity, prevent accidental modifications, and enforce stricter API contracts at compile time.

Source code (C++)
XmlPtr xml = Xml::create();
xml->addChild("Node");					// OK: XmlPtr allows modification

ConstXmlPtr const_xml = Xml::create();
const_xml->addChild("Node");			// Error: cannot modify through ConstXmlPtr

Updated Multithreading#

The AsyncQueue class has been expanded to support explicit task scheduling across multiple threads.

Each task can be assigned to a specific thread type (FILE_STREAM, GPU_STREAM, BACKGROUND, etc.), giving you precise control over where and how your logic runs. Each task can be assigned relative prioritiy, enabling dynamic balancing of workload under high concurrency. This is especially useful for scenarius involving:

  • Asynchronous file I/O
  • GPU-side resource initialization
  • Custom logic that should not block engine threads
  • Parallel computations

See the new AsyncQueueTasks and AsyncQueueStress samples available in both C++ and C# to explore the updates.

A comprehensive set of atomic and synchronization primitives is available to ensure thread-safe execution. These include standard mutexes, recursive locks, spinlocks, and a variety of low-level atomic types. The system supports both automatic (context-aware) synchronization behavior and manual selection of locking strategies, giving developers full control over memory consistency and contention management.

AsyncQueue Class#

CustomSystemProxy Class#

DecalMesh Class#

UNIGINE 2.19.1 UNIGINE 2.20
getMeshCurrentRAM( ) Return value changed.
getMeshForceRAM( ) Return value changed.
getMeshAsyncRAM( ) Return value changed.
getMeshProceduralRAM( ) Renamed as getMeshDynamicRAM( ).
getMeshProceduralVRAM( ) Renamed as getMeshDynamicVRAM( ).
asyncCalculateNodes( int ) Removed.
asyncCalculateEdges( int ) Removed.
setMeshProceduralMode( ObjectMeshStatic::PROCEDURAL_MODE, int ) Set of arguments changed.
isMeshProceduralMode( ) Removed.
applyMeshProcedural( const Ptr<Mesh> & ) Removed. Use one of the following methods:
applyMoveMeshProceduralAsync( const Ptr<Mesh> &, const Ptr<MeshRender> & )
applyMoveMeshProceduralAsync( const Ptr<Mesh> &, int )
applyCopyMeshProceduralAsync( const Ptr<ConstMesh> &, int )
applyMoveMeshProceduralForce( const Ptr<Mesh> &, const Ptr<MeshRender> & )
applyMoveMeshProceduralForce( const Ptr<Mesh> &, int )
applyCopyMeshProceduralForce( const Ptr<ConstMesh> &, int )

New Functions

Dir Class#

Engine Class#

UNIGINE 2.19.1 UNIGINE 2.20
isFastShutdown() Removed. The Engine now behaves as if Fast Shutdown is always set to 1. Please note that re-initializing the Engine again after shutting it down (call init() after shutdown()) without restarting the application is no longer possible!

FileSystem Class#

FileSystemMount Class#

GeodeticPivot Class#

InputGamePad Class#

New Functions

InputJoystick Class#

InputVRDevice Class#

New Functions

Json Class#

New Functions

Landscape Class#

UNIGINE 2.19.1 UNIGINE 2.20
getTemporaryTexture( const Math::ivec2 & ) Removed. Landscape textures should now be created using the corresponding constructor LandscapeTextures::create( const Math::ivec2 & ).
releaseTemporaryTexture( const Ptr<LandscapeTextures> & ) Removed. Landscape textures are now removed via the destructor of the LandscapeTextures class.

New Functions

LandscapeMapFileSettings Class#

LandscapeMapFileSettings Class#

Light Class#

LightEnvironmentProbe Class#

LightVoxelProbe Class#

UNIGINE 2.19.1 UNIGINE 2.20
setAmbientCubicFiltering( bool ) Renamed as setDiffuseCubicFiltering( bool ).
isAmbientCubicFiltering( ) Renamed as isDiffuseCubicFiltering( ).
setAmbientBias( float ) Renamed as setDiffuseNormalBias( float ).
getAmbientBias( ) Renamed as getDiffuseNormalBias( ).
setReflectionEnabled( bool ) Renamed as setSpecularEnabled( bool ).
isReflectionEnabled( ) Renamed as isSpecularEnabled( ).
setReflectionBias( float ) Renamed as setSpecularReflectionBias( float ).
getReflectionBias( ) Renamed as getSpecularReflectionBias( ).
setReflectionCubicFiltering( bool ) Renamed as setSpecularCubicFiltering( bool ).
isReflectionCubicFiltering( ) Renamed as isSpecularCubicFiltering( ).
setReflectionVisibilityRoughnessMin( float ) Renamed as getSpecularVisibilityRoughnessMin( float ).
getReflectionVisibilityRoughnessMin( ) Renamed as getSpecularVisibilityRoughnessMin( ).
setReflectionVisibilityRoughnessMax( float ) Renamed as getSpecularVisibilityRoughnessMax( float ).
getReflectionVisibilityRoughnessMax( ) Renamed as getSpecularVisibilityRoughnessMax( ).

New Functions

Material Class#

Mesh Class#

New Functions

MeshAnimation Class#

UNIGINE 2.19.1 UNIGINE 2.20
flipYZ( ) Return value changed.

MeshRender Class#

ObjectGuiMesh Class#

UNIGINE 2.19.1 UNIGINE 2.20
getMeshCurrentRAM( ) Return value changed.
getMeshForceRAM( ) Return value changed.
getMeshAsyncRAM( ) Return value changed.
getMeshProceduralRAM( ) Renamed as getMeshDynamicRAM( ).
getMeshProceduralVRAM( ) Renamed as getMeshDynamicVRAM( ).
asyncCalculateNodes( int ) Removed.
asyncCalculateEdges( int ) Removed.
applyMeshProcedural( const Ptr<Mesh> & ) Removed. Use one of the following methods:
applyMoveMeshProceduralAsync( const Ptr<Mesh> &, const Ptr<MeshRender> & )
applyMoveMeshProceduralAsync( const Ptr<Mesh> &, int )
applyCopyMeshProceduralAsync( const Ptr<ConstMesh> &, int )
applyMoveMeshProceduralForce( const Ptr<Mesh> &, const Ptr<MeshRender> & )
applyMoveMeshProceduralForce( const Ptr<Mesh> &, int )
applyCopyMeshProceduralForce( const Ptr<ConstMesh> &, int )
setMeshProceduralMode( ObjectMeshStatic::PROCEDURAL_MODE, int ) Set of arguments changed.
isMeshProceduralMode( ) Removed.

New Functions

ObjectLandscapeTerrain Class#

ObjectMeshCluster Class#

UNIGINE 2.19.1 UNIGINE 2.20
applyMeshProcedural( const Ptr<Mesh> & ) Removed. Use one of the following methods:
applyMoveMeshProceduralAsync( const Ptr<Mesh> &, const Ptr<MeshRender> & )
applyMoveMeshProceduralAsync( const Ptr<Mesh> &, int )
applyCopyMeshProceduralAsync( const Ptr<ConstMesh> &, int )
applyMoveMeshProceduralForce( const Ptr<Mesh> &, const Ptr<MeshRender> & )
applyMoveMeshProceduralForce( const Ptr<Mesh> &, int )
applyCopyMeshProceduralForce( const Ptr<ConstMesh> &, int )
getMeshCurrentRAM( ) Return value changed.
getMeshForceRAM( ) Return value changed.
getMeshAsyncRAM( ) Return value changed.
getMeshProceduralRAM( ) Renamed as getMeshDynamicRAM( ).
getMeshProceduralVRAM( ) Renamed as getMeshDynamicVRAM( ).
asyncCalculateNodes( int ) Removed.
asyncCalculateEdges( int ) Removed.
setMeshProceduralMode( ObjectMeshStatic::PROCEDURAL_MODE, int ) Set of arguments changed.
isMeshProceduralMode( ) Removed.

New Functions

ObjectMeshClutter Class#

UNIGINE 2.19.1 UNIGINE 2.20
setMaskMesh( const Ptr<ConstMesh> &, bool ) Set of arguments changed.
applyMeshProcedural( const Ptr<Mesh> & ) Removed. Use one of the following methods:
applyMoveMeshProceduralAsync( const Ptr<Mesh> &, const Ptr<MeshRender> & )
applyMoveMeshProceduralAsync( const Ptr<Mesh> &, int )
applyCopyMeshProceduralAsync( const Ptr<ConstMesh> &, int )
applyMoveMeshProceduralForce( const Ptr<Mesh> &, const Ptr<MeshRender> & )
applyMoveMeshProceduralForce( const Ptr<Mesh> &, int )
applyCopyMeshProceduralForce( const Ptr<ConstMesh> &, int )
getMeshCurrentRAM( ) Set of arguments changed.
getMeshForceRAM( ) Set of arguments changed.
getMeshAsyncRAM( ) Set of arguments changed.
getMeshProceduralRAM( ) Renamed as getMeshDynamicRAM( ).
getMeshProceduralVRAM( ) Renamed as getMeshDynamicVRAM( ).
asyncCalculateNodes( int ) Removed.
asyncCalculateEdges( int ) Removed.
setMeshProceduralMode( ObjectMeshStatic::PROCEDURAL_MODE, int ) Set of arguments changed.
isMeshProceduralMode( ) Removed.

New Functions

ObjectMeshSkinned Class#

UNIGINE 2.19.1 UNIGINE 2.20
getBoneSkiningTransform( int ) Renamed as getBoneSkinningTransform( int ).
applyMeshProcedural( const Ptr<ConstMesh> & ) Set of arguments changed.

ObjectMeshStatic Class#

UNIGINE 2.19.1 UNIGINE 2.20
applyMeshProcedural( const Ptr<Mesh> & ) Removed. Use one of the following methods:
applyMoveMeshProceduralAsync( const Ptr<Mesh> &, const Ptr<MeshRender> & )
applyMoveMeshProceduralAsync( const Ptr<Mesh> &, int )
applyCopyMeshProceduralAsync( const Ptr<ConstMesh> &, int )
applyMoveMeshProceduralForce( const Ptr<Mesh> &, const Ptr<MeshRender> & )
applyMoveMeshProceduralForce( const Ptr<Mesh> &, int )
applyCopyMeshProceduralForce( const Ptr<ConstMesh> &, int )
getMeshCurrentRAM( ) Return value changed.
getMeshForceRAM( ) Return value changed.
getMeshAsyncRAM( ) Return value changed.
getMeshProceduralRAM( ) Renamed as getMeshDynamicRAM( ).
getMeshProceduralVRAM( ) Renamed as getMeshDynamicVRAM( ).
asyncCalculateNodes( int ) Removed.
asyncCalculateEdges( int ) Removed.
setMeshProceduralMode( ObjectMeshStatic::PROCEDURAL_MODE, int ) Set of arguments changed.
isMeshProceduralMode( ) Removed.

New Functions

PackageUng Class#

UNIGINE 2.19.1 UNIGINE 2.20
PackageUng( const char *, const char * ) Set of arguments changed.
clone( ) Removed.
getCompressionType( ) Removed. Use getCompressExtension( int ) instead.
getFileName( int ) Removed. Use getFilePath( int ) instead.
removeFile( const char * ) Removed.
removeFile( int ) Removed.

New Functions

Property Class#

PropertyParameter Class#

Render Class#

UNIGINE 2.19.1 UNIGINE 2.20
getD3D11Factory( ) Removed.
getD3D11Device( ) Removed.
getD3D11Context( ) Removed.
getD3D11Context( ) Removed.
setSSRTGINoiseStep ( float ) Removed.
getSSRTGINoiseStep ( ) Removed.
getEventBeginAuxiliaryBuffer ( ) Removed. Use getEventBeginAuxiliarySurfaces() or getEventBeginAuxiliaryDecals() instead.
getEventEndAuxiliaryBuffer ( ) Removed. Use getEventEndAuxiliarySurfaces() or getEventEndAuxiliaryDecals() instead.

New Functions

Renderer Class#

RenderState Class#

RenderTarget Class#

Profiler Class#

Shader Class#

UNIGINE 2.19.1 UNIGINE 2.20
getD3D11ComputeShader( ) Removed.
getD3D11ControlShader( ) Removed.
getD3D11EvaluateShader( ) Removed.
getD3D11FragmentShader( ) Removed.
getD3D11GeometryShader( ) Removed.
getD3D11VertexShader( ) Removed.

StructuredBuffer Class#

UNIGINE 2.19.1 UNIGINE 2.20
getD3D11ShaderResourceView( ) Removed.
getD3D11UnorderedAccessView( ) Removed.
isUsageCPUResource( ) Removed. Use isUsageRender( ) instead.
isUsageGPUResource( ) Removed. Use isUsageRender( ) instead.

New Functions

Texture Class#

Unsupported texture formats (RGB8/RGB16/RGB32, R24B8, D24) were removed, see replacement details below.

UNIGINE 2.19.1 UNIGINE 2.20
create( const Ptr<Image> &, int, int, int ) Set of arguments changed.
getD3D11DepthStencilView( ) Removed.
getD3D11DepthStencilView( int ) Removed.
getD3D11RenderTargetView( int ) Removed.
getD3D11RenderTargetView( ) Removed.
getD3D11ShaderResourceView( ) Removed.
getD3D11Texture( ) Removed.
getD3D11UnorderedAccessView( int ) Removed.
fromD3D11Texture2D( void *, int, int, int, int, int ) Removed.
fromD3D11Texture2D( void *, int, int, int, int ) Removed.
FORMAT_RGB8 Removed. Use FORMAT_RGBA8 instead.
FORMAT_RGB16 Removed. Use FORMAT_RGBA16 instead.
FORMAT_RGB16U Removed. Use FORMAT_RGBA16U instead.
FORMAT_RGB16F Removed. Use FORMAT_RGBA16F instead.
FORMAT_RGB32U Removed. Use FORMAT_RGBA32U instead.
FORMAT_RGB32F Removed. Use FORMAT_RGBA32F instead.
FORMAT_R24B8 Removed. Use FORMAT_R32F instead.
FORMAT_D24 Removed. Use FORMAT_D32F instead (in case the Stencil was used, replace with FORMAT_D24S8/FORMAT_D32FS8).

VR Class#

VREyeTracking Class#

VRHand Class#

UNIGINE 2.19.1 UNIGINE 2.20
isActive( ) Renamed as isTracking( ).

VRHandTracking Class#

New Functions

VRMixedReality Class#

Viewport Class#

ViewportData Class#

Visualizer Class#

Widget Class#

WidgetTreeBox Class#

WidgetVBox Class#

IG::Manager Class#

IG::Entity Class#

The information on this page is valid for UNIGINE 2.20 SDK.

Last update: 2025-07-10
Build: ()