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
双精度坐标
应用程序接口
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

Breaking Changes#

New HashMap/HashSet#

To improve performance and reduce memory consumption we have made some refactoring and optimization regarding Hash Maps and Hash Sets for this release. They both now store data linearly similar to vectors, which requires some changes in your code is case you have used them.

The findFast() method now returns a pointer instead of a double pointer:

UNIGINE 2.19 UNIGINE 2.19.1
ValueType **Hash::findFast(const KeyType &key) const
Source code (C++)
Unigine::HashMap<int, int> hash_map;
//...
auto item = hash_map.findFast(0);
if(item)
   Unigine::Log::message("%d\n", (*item)->data);
ValueType *Hash::findFast(const KeyType &key) const
Source code (C++)
Unigine::HashMap<int, int> hash_map;
//...
auto item = hash_map.findFast(0);
if(item)
   Unigine::Log::message("%d\n", item->data);

The emplace() method now returns an Iterator instead of a value:

UNIGINE 2.19 UNIGINE 2.19.1
ValueType &Hash::emplace(const KeyType &key)
Source code (C++)
Unigine::HashMap<int, int> hash_map;
Unigine::Log::message("%d\n", hash_map.emplace(0));
Iterator Hash::emplace(const KeyType &key)
Source code (C++)
Unigine::HashMap<int, int> hash_map;
Unigine::Log::message("%d\n", hash_map.emplace(0)->data);

HashMap vs BucketHashMap#

We've also kept the previous hash map implementation for backward compatibility and some specific cases, it is called BucketHashMap. Here is one of such examples, where the BucketHashMap must be used instead of the new HashMap - pointers to a key/value:

UNIGINE 2.19.1 - HashMap UNIGINE 2.19.1 - BucketHashMap
Source code (C++)
int *find(const HashMap<int, int> &hash_map, int key) {
	const auto &it = hash_map.find(key);
	if(it == hash_map.end()) return nullptr;
	return &it->data; //<-potentials crashes, use BucketHashMap
}
Source code (C++)
int *find(const BucketHashMap<int, int> &hash_map, int key) {
	const auto &it = hash_map.find(key);
	if(it == hash_map.end()) return nullptr;
	return &it->data; //<-everything is ok!
}

AnimationPlayback Class#

BootConfig Class#

CustomSystemProxy Class#

Decal Class#

Engine Class#

EngineWindowGroup Class#

New Functions

Input Class#

InputJoystick Class#

LightEnvironmentProbe Class#

LightOmni Class#

LightProj Class#

Log Class#

Material Class#

Materials Class#

UNIGINE 2.19 UNIGINE 2.19.1
compileShaders( ) Removed. Use CreateShaderCache( bool ) instead.

New Functions

ObjectParticles Class#

UNIGINE 2.19 UNIGINE 2.19.1
setLinearDamping( float ) Removed. Use getLinearDampingOverTimeModifier( ) instead.
getLinearDamping( ) Removed. Use getLinearDampingOverTimeModifier( ) instead.

New Functions

Profiler Class#

Render Class#

UNIGINE 2.19 UNIGINE 2.19.1
isQuadroSync( ) Removed.
setQuadroSync( bool ) Removed.
getTemporaryTexture( const Ptr<Texture> & ) Removed. Use getTemporaryTexture( const Ptr<Texture> &, const char *, Render::TEXTURE_ACCESSORY, Render::TEXTURE_LIFETIME, bool ) instead.
getTemporaryTexture( const Ptr<Texture> &, const char * ) Removed. Use getTemporaryTexture( const Ptr<Texture> &, const char *, Render::TEXTURE_ACCESSORY, Render::TEXTURE_LIFETIME, bool ) instead.
getTemporaryTexture( const Ptr<Texture> &, const char *, int ) Removed. Use getTemporaryTexture( const Ptr<Texture> &, const char *, Render::TEXTURE_ACCESSORY, Render::TEXTURE_LIFETIME, bool ) instead.
getTemporaryTexture( int, int, int, int, int, int, const char * ) Removed. Use getTemporaryTexture( int, int, int, int, int, int, const char *, Render::TEXTURE_ACCESSORY, Render::TEXTURE_LIFETIME, bool ) instead.
getTemporaryTexture( int, int, int, int, int, int ) Removed. Use getTemporaryTexture( int, int, int, int, int, int, const char *, Render::TEXTURE_ACCESSORY, Render::TEXTURE_LIFETIME, bool ) instead.
getTemporaryTexture( int, int, int, int, int, int, const char *, Render::TEXTURE_ACCESSORY, Render::TEXTURE_LIFETIME, bool ) Set of arguments changed.
getTemporaryTexture2D( int, int, int, int, const char *, Render::TEXTURE_ACCESSORY, Render::TEXTURE_LIFETIME, bool ) Set of arguments changed.
getTemporaryTexture2DArray( int, int, int, int, int, const char *, Render::TEXTURE_ACCESSORY, Render::TEXTURE_LIFETIME, bool ) Set of arguments changed.
getTemporaryTexture3D( int, int, int, int, int, const char *, Render::TEXTURE_ACCESSORY, Render::TEXTURE_LIFETIME, bool ) Set of arguments changed.
getTemporaryTextureCube( int, int, int, int, const char *, Render::TEXTURE_ACCESSORY, Render::TEXTURE_LIFETIME, bool ) Set of arguments changed.
getTemporaryOldTexture( const Ptr<Material> &, int, int, int, int, int, int, int, const char * ) Removed. Use getTemporaryOldTexture( const Ptr<Material> &, int, Texture, const char *, Render::TEXTURE_ACCESSORY ) instead.
getTemporaryOldTexture( const Ptr<Material> &, int, int, int, int, int, int, int ) Removed. Use getTemporaryOldTexture( const Ptr<Material> &, int, Texture, const char *, Render::TEXTURE_ACCESSORY ) instead.
getTemporaryOldTexture( const Ptr<Material> &, int, const Ptr<Texture> &, const char * ) Removed. Use getTemporaryOldTexture( const Ptr<Material> &, int, Texture, const char *, Render::TEXTURE_ACCESSORY ) instead.
getTemporaryOldTexture( const Ptr<Material> &, int, const Ptr<Texture> & ) Removed. Use getTemporaryOldTexture( const Ptr<Material> &, int, Texture, const char *, Render::TEXTURE_ACCESSORY ) instead.

New Functions

WallGroupData Class#

World Class#

Manager Class (IG)#

Entity Class (IG)#

Last update: 2024-12-13
Build: ()