This page has been translated automatically.
Video Tutorials
Interface
Essentials
Advanced
How To
Basics
Rendering
Professional (SIM)
UnigineEditor
Interface Overview
Assets Workflow
Version Control
Settings and Preferences
Working With Projects
Adjusting Node Parameters
Setting Up Materials
Setting Up Properties
Lighting
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
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
Content Creation
Content Optimization
Materials
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Tutorials

API Migration

Major Changes#

Breaking Changes#

UGUID Migration#

We have optimized UGUIDs to reduce memory consumption. The main change is that a UGUID no longer stores a string. Combined with internal enhancements, this made the UGUID 52 bytes smaller than its previous version.

These changes will require some manual code migration in case your project contains UGUID managemet via API.

Notice
We strongly recommend avoiding the "find and replace" approach when migrating your code, as some methods have changed their return values.
  1. Replace all UGUID::getString() calls with UGUID::makeString().
    2.18.1
    Source code (C++)
    const char *guid_str = guid.getString();
    Unigine::Log::message("Guid string %s\n", guid.getString());
    2.19
    Source code (C++)
    GUIDString guid_str = guid.makeString();
    Unigine::Log::message("Guid string %s\n", guid.makeString().get());
  2. Replace all UGUID::get() calls with FileSystem::guidToPath(const UGUID &guid).
    2.18.1
    Source code (C++)
    const char *guid_str = guid.get();
    Unigine::Log::message("Guid string %s\n", guid.get());
    2.19
    Source code (C++)
    String guid_str = Unigine::FileSystem::guidToPath(guid);
    Unigine::Log::message("Guid file system string %s\n", Unigine::FileSystem::guidToPath(guid).get());
  3. Replace all UGUID::getFileSystemString() calls with FileSystem::guidToPath(const UGUID &guid).
    Notice
    The method has been moved to the FileSystem class.
    2.18.1
    Source code (C++)
    const char *guid_str = guid.getFileSystemString();
    Unigine::Log::message("Guid string %s\n", guid.getFileSystemString());
    2.19
    Source code (C++)
    String guid_str = Unigine::FileSystem::guidToPath(guid);
    Unigine::Log::message("Guid file system string %s\n", Unigine::FileSystem::guidToPath(guid).get());
  4. Replace all UGUID::setFileSystemString(const char* str) calls with FileSystem::pathToGuid(const char* str).
    Notice
    The method has been moved to the FileSystem class.
    2.18.1
    Source code (C++)
    UGUID guid;
    guid.setFileSystemString("guid://dd39448b6c7f113dc1063ec864de885476c9ba3b");
    2.19
    Source code (C++)
    UGUID guid = Unigine::FileSystem::pathToGuid("guid://dd39448b6c7f113dc1063ec864de885476c9ba3b");

BodyFracture Class#

UNIGINE 2.18.1 UNIGINE 2.19
setMaterialPath( const char * ) Renamed as setMaterialFilePath( const char * ).
getMaterialPath( ) Renamed as getMaterialFilePath( ).

BonesRetargeting Class#

BootConfig Class#

Decal Class#

UNIGINE 2.18.1 UNIGINE 2.19
setMaterialPath( const char * ) Renamed as setMaterialFilePath( const char * ).
getMaterialPath( ) Renamed as getMaterialFilePath.

DecalMesh Class#

UNIGINE 2.18.1 UNIGINE 2.19
getMeshInfo( ) Removed. Use getMeshCurrentRAM( ) and getMeshCurrentVRAM( ) instead.
getMeshForce( ) Removed. Use getMeshForceRAM( ) and getMeshForceVRAM( ) instead.
getMeshAsync( ) Removed. Use getMeshAsyncRAM( ) and getMeshAsyncVRAM( ) instead.
getMeshForceVRAM( ) Return value type changed.
getMeshAsyncVRAM( ) Return value type changed.

New Functions

EngineWindowViewport Class#

FileSystem Class#

ImportProcessor Class#

Importer Class#

Input Class#

UNIGINE 2.18.1 UNIGINE 2.19
VR_BUTTON_SYSTEM_LEFT Removed.
VR_BUTTON_SYSTEM_RIGHT Removed.
VR_BUTTON_A Removed.
VR_BUTTON_B Removed.
VR_BUTTON_GRIP_LEFT Removed.
VR_BUTTON_GRIP_RIGHT Removed.
VR_BUTTON_AXIS_0_LEFT Removed.
VR_BUTTON_AXIS_0_RIGHT Removed.
VR_BUTTON_AXIS_1_LEFT Removed.
VR_BUTTON_AXIS_1_RIGHT Removed.
VR_BUTTON_AXIS_2_LEFT Removed.
VR_BUTTON_AXIS_2_RIGHT Removed.
VR_BUTTON_AXIS_3_LEFT Removed.
VR_BUTTON_AXIS_3_RIGHT Removed.
VR_BUTTON_AXIS_4_LEFT Removed.
VR_BUTTON_AXIS_4_RIGHT Removed.

New Functions

InputVRController Class#

InputVRDevice Class#

InputVRHead Class#

Light Class#

UNIGINE 2.18.1 UNIGINE 2.19
setBakedDepthTexturePath( const char * ) Renamed as setBakedDepthTextureFilePath( const char * ).
getBakedDepthTexturePath( ) Renamed as getBakedDepthTextureFilePath( ).

New Functions

LightEnvironmentProbe Class#

LightOmni Class#

UNIGINE 2.18.1 UNIGINE 2.19
setTexturePath( const char * ) Renamed as setTextureFilePath( const char * ).
getTexturePath( ) Renamed as getTextureFilePath( ).

LightProj Class#

UNIGINE 2.18.1 UNIGINE 2.19
setTexturePath( const char * ) Renamed as setTextureFilePath( const char * ).
getTexturePath( ) Renamed as getTextureFilePath( ).

LightVoxelProbe Class#

UNIGINE 2.18.1 UNIGINE 2.19
setTexturePath( const char * ) Renamed as setTextureFilePath( const char * ).
getTexturePath( ) Renamed as getTextureFilePath( ).

Material Class#

UNIGINE 2.18.1 UNIGINE 2.19
setDepthMask( int ) Removed.
getDepthMask( ) Removed.
OPTION_DEPTH_MASK Removed.
TEXTURE_SOURCE_INDIRECT_DIFFUSE Renamed as TEXTURE_SOURCE_INDIRECT_DIFFUSE_FINAL.
TEXTURE_SOURCE_INDIRECT_SPECULAR Renamed as TEXTURE_SOURCE_INDIRECT_SPECULAR_FINAL.

New Functions

Memory Class#

UNIGINE 2.18.1 UNIGINE 2.19
getHeapUsage( ) Removed.
getNumFrameAllocations( ) Removed.
getNumAllocations( ) Removed.
getSystemUsage( ) Removed.

New Functions

Mesh Class#

UNIGINE 2.18.1 UNIGINE 2.19
setAnimationBones( int, const Vector< short > & ) Removed. Use MeshAnimation::setAnimationBones( const Vector< short > & ) instead.
getAnimationBones( int, Vector< short > & ) Removed. Use MeshAnimation::getAnimationBones( Vector< short > & ) instead.
setAnimationFrame( int, int, const Vector< Math::vec3 > &, const Vector< Math::quat > &, const Vector< Math::vec3 > &, int, int, int ) Removed. Use MeshAnimation::setFrame( int, const Vector< Math::vec3 > &, const Vector< Math::quat > &, const Vector< Math::vec3 > & ) instead.
setAnimationFrame( int, int, int, const Vector< Math::mat4 > & ) Removed. Use MeshAnimation::setFrame( int, const Vector< Math::mat4 > & ) instead.
getAnimationFrame( int, int, Vector< Math::vec3 > &, Vector< Math::quat > &, Vector< Math::vec3 > &, int ) Removed. Use MeshAnimation::getFrame( int, Vector< Math::vec3 > &, Vector< Math::quat > &, Vector< Math::vec3 > & ) instead.
getAnimationFrame( int, int, int, int, int, int, Vector< Math::mat4 > & ) Removed. Use MeshAnimation::getFrame( int, Vector< Math::mat4 > & ) instead.
setAnimationName( int, const char * ) Removed.
getAnimationName( int ) Removed
setBoneTransforms( const Vector<Math::mat4> & ) Set of arguments changed.
getBoneTransforms( Vector<Math::mat4> & ) Set of arguments changed.
setNumAnimationFrames( int, int ) Removed. Use MeshAnimation::setNumFrames( int ) instead.
getNumAnimationFrames( int ) Removed. Use MeshAnimation::getNumFrames( int ) instead.
getNumAnimations( ) Removed.
addAnimation( const char * ) Removed.
findAnimation( const char * ) Removed.
sortAnimations( ) Removed.

Node Class#

Object Class#

UNIGINE 2.18.1 UNIGINE 2.19
Enum STREAMING_OBJECT_MESH Removed.
setMaterialPath( const char *, int ) Renamed as setMaterialFilePath( const char *, int ).
setMaterialPath( const char *, const char * ) Renamed as setMaterialFilePath( const char *, const char * ).
getMaterialPath( int ) Renamed as getMaterialFilePath( int ).

ObjectMeshCluster Class#

UNIGINE 2.18.1 UNIGINE 2.19
getMeshInfo( ) Removed. Use getMeshCurrentRAM( ) and getMeshCurrentVRAM( ) instead.
getMeshForce( ) Removed. Use getMeshForceRAM( ) and getMeshForceVRAM( ) instead.
getMeshAsync( ) Removed. Use getMeshAsyncRAM( ) and getMeshAsyncVRAM( ) instead.
getMeshForceVRAM( ) Return value type changed.
getMeshAsyncVRAM( ) Return value type changed.
setMeshStreamingModeRAM( Object::STREAMING_OBJECT_MESH ) Removed.
getMeshStreamingModeRAM( ) Removed.
setMeshStreamingModeVRAM( Object::STREAMING_OBJECT_MESH ) Removed.
getMeshStreamingModeVRAM( ) Removed.

New Functions

ObjectMeshClutter Class#

UNIGINE 2.18.1 UNIGINE 2.19
getMeshInfo( ) Removed. Use getMeshCurrentRAM( ) and getMeshCurrentVRAM( ) instead.
getMeshForce( ) Removed. Use getMeshForceRAM( ) and getMeshForceVRAM( ) instead.
getMeshAsync( ) Removed. Use getMeshAsyncRAM( ) and getMeshAsyncVRAM( ) instead.
getMeshForceVRAM( ) Return value type changed.
getMeshAsyncVRAM( ) Return value type changed.
setMeshStreamingModeRAM( Object::STREAMING_OBJECT_MESH ) Removed.
getMeshStreamingModeRAM( ) Removed.
setMeshStreamingModeVRAM( Object::STREAMING_OBJECT_MESH ) Removed.
getMeshStreamingModeVRAM( ) Removed.

New Functions

ObjectGuiMesh Class#

UNIGINE 2.18.1 UNIGINE 2.19
getMeshInfo( ) Removed. Use getMeshCurrentRAM( ) and getMeshCurrentVRAM( ) instead.
getMeshForce( ) Removed. Use getMeshForceRAM( ) and getMeshForceVRAM( ) instead.
getMeshAsync( ) Removed. Use getMeshAsyncRAM( ) and getMeshAsyncVRAM( ) instead.
getMeshForceVRAM( ) Return value type changed.
getMeshAsyncVRAM( ) Return value type changed.
setMeshStreamingModeRAM( Object::STREAMING_OBJECT_MESH ) Removed.
getMeshStreamingModeRAM( ) Removed.
setMeshStreamingModeVRAM( Object::STREAMING_OBJECT_MESH ) Removed.
getMeshStreamingModeVRAM( ) Removed.

New Functions

ObjectMeshSkinned Class#

UNIGINE 2.18.1 UNIGINE 2.19
Enum FRAME_USES Renamed as ANIM_FRAME_USES.
ObjectMeshSkinned( const Ptr<Mesh> & ) Removed. Use applyMeshProcedural( const Ptr<Mesh> & ) instead.
ObjectMeshSkinned( const char *, bool ) Removed. If unique=true, use applyMeshProcedural( const Ptr<Mesh> & ) instead.
setAnimation( int, variable, int ) Removed. Use getAnimationResourceID( const char * ) or setLayerAnimationResourceID( int, long long ) instead.
setAnimation( int, const char * ) Removed. Use setLayerAnimationFilePath( int, const char * ) instead.
getAnimation( int ) Removed. Use getLayerAnimationResourceID( int ) instead.
getAnimationID( int ) Removed. Use getAnimationResourceID( const char * ) instead.
getAnimationPath( int ) Removed. Use getLayerAnimationFilePath( int ) instead.
setAnimName( const char * ) Removed.
setAnimNameForce( const char * ) Removed. Use setAnimPath( const char * ) instead.
getAnimName( ) Removed. Use getAnimPath( const char * ) instead.
getBoneBindTransform( int ) Removed. Use getBoneBindLocalTransform( int ) instead.
setCIndex( int, int, int ) Removed.
setColor( int, const Math::vec4 &, int ) Removed.
setFrame( int, float, int, int ) Removed. Use setLayerFrame( int, float, int, int ) instead.
getFrame( int ) Removed. Use getLayerFrame( int ) instead.
getFrameFrom( int ) Removed. Use getLayerFrameFrom( int ) instead.
getFrameTo( int ) Removed. Use getLayerFrameTo( int ) instead.
getBoneBindITransform( int ) Removed. Use getBoneBindObjectITransform( int ) instead.
getBoneITransform( int ) Removed.
setBoneLayerTransform( int, int, const Math::mat4 & ) Removed. Use setLayerBoneTransform( int, int, const Math::mat4 & ) instead.
getBoneLayerTransform( int, int ) Removed. Use getLayerBoneTransform( int, int ) instead.
isBoneLayerTransform( int, int ) Removed. Use isLayerBoneTransform( int, int ) instead.
setBoneLayerTransformEnabled( int, int, bool ) Removed. Use setLayerBoneTransformEnabled( int, int, bool ) instead.
setMesh( const Ptr<Mesh> & ) Removed. Use applyMeshProcedural( const Ptr<Mesh> & ) instead.
setMeshName( const char * ) Removed.
setMeshNameForce( const char * ) Removed. Use setMeshPath( const char * ) instead.
getMeshName( ) Removed. Use getMeshPath( ) instead.
getNumAnimationBones( int ) Removed. Use MeshAnimation::getNumBones( ) instead.
getNumAnimationFrames( int ) Removed. Use MeshAnimation::getNumFrames( int ) instead.
getNumAnimations( ) Removed.
getNumFrames( int ) Removed. Use getLayerNumFrames( int ) instead.
setNumTargets( int, int ) Removed.
getNumTargets( int ) Removed. Use getNumSurfaceTargets( int ) instead.
setNumTexCoords0( int, int ) Removed.
setNumTexCoords1( int, int ) Removed.
isFlushed( ) Removed.
setSurfaceTransform( const Math::mat4 &, int, int ) Removed.
setTangent( int, const Math::quat &, int, int ) Removed.
setTarget( int, bool, int, float, int ) Removed.
setTargetEnabled( int, bool, int ) Removed. Use setSurfaceTargetEnabled( int, int, bool ) instead.
isTargetEnabled( int, int ) Removed. Use isSurfaceTargetEnabled( int, int ) instead.
setTargetIndex( int, int, int ) Removed.
getTargetIndex( int, int ) Removed.
setTargetWeight( int, float, int ) Removed. Use setSurfaceTargetWeight( int, int, float ) instead.
getTargetWeight( int, int ) Removed. Use getSurfaceTargetWeight( int, int ) instead.
setTexCoord0( int, const Math::vec2 &, int ) Removed.
setTexCoord1( int, const Math::vec2 &, int ) Removed.
setTIndex( int, int, int ) Removed.
setVertex( int, const Math::vec3 &, int, int ) Removed.
addAnimation( const Ptr<Mesh> &, const char * ) Removed.
addAnimation( const char * ) Removed.
addRetargetedAnimation( const char *, const Ptr<BonesRetargeting> & ) Removed.
addRetargetedAnimation( const Ptr<Mesh> &, const Ptr<BonesRetargeting> &, const char * ) Removed.
addEmptySurface( const char *, int, int ) Removed.
addMeshSurface( variable, variable, const char *, const Ptr<ObjectMeshSkinned> &, int, int ) Removed.
addMeshSurface( int, const Ptr<ObjectMeshSkinned> &, int, int ) Removed.
addMeshSurface( const char *, const Ptr<Mesh> &, int, int ) Removed.
addSurfaceTarget( int, const char * ) Removed.
addSurfaceTarget( int, const Ptr<ObjectMeshSkinned> &, int, int ) Removed.
addTarget( int ) Removed.
createMesh( const char *, bool ) Removed.
findAnimation( const char * ) Removed.
findSurfaceTarget( int, const char * ) Set of arguments changed.
flushMesh( ) Removed.
loadMesh( const char * ) Removed. Use setMeshPath( const char * ) instead.
mergeMeshSurface( int, const Ptr<ObjectMeshSkinned> &, int ) Removed.
removeAnimation( int ) Removed.
removeTarget( int, int ) Removed.
saveMesh( const char * ) Removed.
updateSurfaceBounds( int ) Removed.
setBoneFrameUses( int, int, ObjectMeshSkinned::FRAME_USES ) Removed. Use setLayerBoneFrameUses( int, int, ObjectMeshSkinned::ANIM_FRAME_USES ) instead.
getBoneFrameUses( int, int ) Removed. Use getLayerBoneFrameUses( int, int ) instead.
getIKChain( int ) Removed. Use getIKChainID( int ) instead.
setIKChainUsePoleVector( bool, int ) Removed. Use setIKChainConstraint( ObjectMeshSkinned::CHAIN_CONSTRAINT, int ) instead.
isIKChainUsePoleVector( int ) Removed. Use getIKChainConstraint( int ) instead.

New Functions

ObjectMeshStatic Class#

UNIGINE 2.18.1 UNIGINE 2.19
setLightmapTexturePath( const char *, int ) Renamed as setLightmapTextureFilePath( const char *, int ).
getLightmapTexturePath( int ) Renamed as getLightmapTextureFilePath( int ).
getMeshInfo( ) Removed. Use getMeshCurrentRAM( ) and getMeshCurrentVRAM( ) instead.
getMeshForce( ) Removed. Use getMeshForceRAM( ) and getMeshForceVRAM( ) instead.
getMeshAsync( ) Removed. Use getMeshAsyncRAM( ) and getMeshAsyncVRAM( ) instead.
getMeshForceVRAM( ) Return value type changed.
getMeshAsyncVRAM( ) Return value type changed.
setMeshStreamingModeRAM( Object::STREAMING_OBJECT_MESH ) Removed.
getMeshStreamingModeRAM( ) Removed.
setMeshStreamingModeVRAM( Object::STREAMING_OBJECT_MESH ) Removed.
getMeshStreamingModeVRAM( ) Removed.

New Functions

Package Class#

PackageUng Class#

New Functions

Property Class#

UNIGINE 2.18.1 UNIGINE 2.19
setPath( const char * ) Renamed as setFilePath( const char * ).
getPath( ) Renamed as getFilePath( ).

Render Class#

UNIGINE 2.18.1 UNIGINE 2.19
Enum STREAMING_MESHES Removed.
Enum STREAMING_TEXTURES Removed.
setStreamingMaxThreads( int ) Removed.
getStreamingMaxThreads() Removed.
setStreamingBudgetLoading( float ) Removed.
getStreamingBudgetLoading() Removed.
setStreamingBudgetDestroyTextures( float ) Removed.
getStreamingBudgetDestroyTextures() Removed.
setStreamingBudgetDestroyMeshes( float ) Removed.
getStreamingBudgetDestroyMeshes() Removed.
setStreamingTexturesMemoryLimit( int ) Removed.
getStreamingTexturesMemoryLimit() Removed.
setStreamingTexturesLifeTime( int ) Removed.
getStreamingTexturesLifeTime() Removed.
setStreamingMeshesLimitVRAM( int ) Removed.
getStreamingMeshesLimitVRAM() Removed.
setStreamingMeshesLifeTimeVRAM( int ) Removed.
getStreamingMeshesLifeTimeVRAM() Removed.
setStreamingMeshesLimitRAM( int ) Removed.
getStreamingMeshesLimitRAM() Removed.
setStreamingMeshesLifeTimeRAM( int ) Removed.
getStreamingMeshesLifeTimeRAM() Removed.
getGPUMemory() Removed.
getGPUName() Removed.
setMaxNumActiveTargets( int ) Removed.
getMaxNumActiveTargets() Removed.
destroyCacheTexture( const UGUID& ) Removed.
createCacheTexture( const UGUID& ) Removed.
destroyCacheTextures( ) Removed.
unloadCacheTextures( ) Removed.
loadCacheTextures( ) Removed.
getCacheTexture( const UGUID &, bool ) Set of arguments changed.
getGLContext( ) Removed.
reloadCacheTexture( const UGUID & ) Removed.

New Functions

Renderer Class#

UNIGINE 2.18.1 UNIGINE 2.19
getAllSurfaces( Vector <Renderer::RenderSurface> & ) Removed.
renderMeshStatic( const Ptr<MeshStatic> &, const Ptr<Material> &, const char *, const Math::Mat4 &, const Ptr<Camera> & ) Removed. Use renderMesh( const Ptr<MeshRender> &, const Ptr<Material> &, const char *, const Math::Mat4 &, const Ptr<Camera> & ) instead.

New Functions

Shader Class#

UNIGINE 2.18.1 UNIGINE 2.19
getGLProgramID( ) Removed.

StructuredBuffer Class#

UNIGINE 2.18.1 UNIGINE 2.19
getGLBufferID( ) Removed.

SystemInfo Class#

TerrainDetail Class#

UNIGINE 2.18.1 UNIGINE 2.19
setMaterialPath( const char * ) Renamed as setMaterialFilePath( const char * ).
getMaterialPath( ) Renamed as getMaterialFilePath( ).

Texture Class#

UNIGINE 2.18.1 UNIGINE 2.19
getGLInternalFormat( ) Removed.
getGLPixelFormat( ) Removed.
getGLPixelType( ) Removed.
getGLTarget( ) Removed.
getGLTextureID( ) Removed.
fromGLTexture2D( unsigned int, int, int, int, int ) Removed.
fromGLTexture2D( unsigned int, int, int, int, int, int ) Removed.

UGUID Class#

UNIGINE 2.18.1 UNIGINE 2.19
getString () Renamed as makeString ().
getFileSystemString () Removed. Use FileSystem::guidToPath (const UGUID &guid) instead.
setFileSystemString (const char* str) Removed. Use FileSystem::pathToGuid (const char* str) instead.
get () Removed.
hashLong( ) Removed.

New Functions

VR Class#

VRMixedReality Class#

WidgetEditLine Class#

WidgetEditText Class#

World Class#

WorldClutter Class#

Xml Class#

Syncker::Manager Class#

New Functions

Syncker::Master Class#

Syncker::Slave Class#

Syncker::Syncker Class#

UNIGINE 2.18.1 UNIGINE 2.19
setView( int, const char * ) Removed.
getView( int ) Removed.
clearViews( ) Removed.
getViewOffset( ) Removed.
Last update: 2024-07-19
Build: ()