API Migration
Major Changes
- Added new FileSystemMount class.
AmbientSource Class
BodyRigid Class
Camera Class
Decal Class
EditorLogic Class
UNIGINE 2.7.1 | UNIGINE 2.7.2 |
---|---|
materialReparented() | Set of arguments changed. |
propertyReparented() | Set of arguments changed. |
Engine Class
UNIGINE 2.7.1 | UNIGINE 2.7.2 |
---|---|
getNumDataPaths() | Removed. |
getDataPath() | Set of arguments and return value type changed. |
New Functions
FileSystem Class
UNIGINE 2.7.1 | UNIGINE 2.7.2 |
---|---|
getAbsoluteFileName() | Removed. Use getAbsolutePath() instead. |
getRelativeFileName() | Removed. Use getVirtualPath() instead. |
getKnownAbsoluteFileNames() | Removed. |
getFileNames() | Removed. |
getNumFiles() | Removed. |
addDirectory() | Removed. |
clearGUIDs() | Removed. |
getFileName() | Removed. |
getKnownFileNames() | Removed. Use getVirtualFiles() instead. |
getKnownFileName() | Removed. |
isKnownFile() | Removed. Use isVirtualFile() instead. |
addKnownFile() | Removed. Use addVirtualFile() instead. |
removeKnownFile() | Removed. Use removeVirtualFile() instead. |
renameKnownFile() | Removed. Use renameVirtualFile() instead. |
resolvePartialFileName() | Removed. Use resolvePartialVirtualPath() instead. |
clearNonexistentPaths() | Removed. Use removeNonExistingVirtualFiles() instead. |
addModifier() | Removed. |
getModifier() | Removed. |
removeModifier() | Removed. |
clearModifiers() | Removed. |
getNumModifiers() | Removed. |
findPackage() | Removed. |
loadPackage() | Set of arguments and return value type changed. |
reloadPackage() | Removed. |
removePackage() | Set of arguments and return value type changed. |
getPackageFileName() | Removed. |
getPackageFileNames() | Removed. |
getPackageName() | Removed. |
getNumPackageFiles() | Removed. |
getNumPackages() | Removed. |
isAssetPath() | Return value type changed. |
isGUIDPath() | Return value type changed. |
isFile() | Removed. Use isFileExist() instead. |
isBlobFile() | Return value type changed. |
isBlobFile() | Return value type changed. |
addBlobFile() | Return value type changed. |
addBlobFile() | Set of arguments and return value type changed. |
removeBlobFile() | Return value type changed. |
removeBlobFile() | Return value type changed. |
isCacheFile() | Return value type changed. |
isCacheFile() | Return value type changed. |
addCacheFile() | Set of arguments and return value type changed. |
addCacheFile() | Return value type changed. |
removeCacheFile() | Return value type changed. |
removeCacheFile() | Return value type changed. |
isPackageFile() | Set of arguments and return value type changed. |
getFileName() | Removed. |
setMTime() | Removed. |
getMTime() | Set of arguments changed. |
getExtension() | Set of arguments changed. |
getExtension() | Set of arguments changed. |
setGUID() | Set of arguments changed. |
getGUID() | Set of arguments changed. |
loadGUIDs() | Return value type changed. |
saveGUIDs() | Set of arguments changed. |
New Functions
- addMount()
- clearMounts()
- addExternPackage()
- preloadExternPackage()
- clearPreloadedExternPackages()
- clearExternPackages()
- createMount()
- getMount()
- getMount()
- getMounts()
- getRootMount()
- getMTime()
- getPackageVirtualFiles()
- getPackageVirtualFiles()
- getVirtualFiles()
- isDiskFile()
- isFileExist()
- isFileExist()
- loadPackage()
- removeMount()
- removeNonExistingVirtualFiles()
FileSystemAssets Class
Migrating Your Code
If you access files by names instead of GUIDs, after migration to UNIGINE 2.7.2, you will have to manually migrate the source code.
Addressing Files
Now the virtual path to a file of the external directory will include the name of the mount point. The created mount point cannot provide access to external content in such a way as if it is stored in the root of the data folder (like it was with multiple data paths).
For example, if you have the D:\external_content folder that is specified in the additional -data_path:
- D:\external_content
- 1.tga
In UNIGINE 2.7.1, it is addressed as follows:
Image::create("1.tga");
However, in UNIGINE 2.7.2, when you replace the additional -data_path with a mount point external_images.umount, you will address the same file as follows:
Image::create("external_images/1.tga");
Migrating Partial Paths
If you actively used partial paths in your project, you should resolve them via the resolvePartialVirtualPath() method, that converts the given partial path to the virtual one, and then use the resulting path.
For example, if you access the data/project/image_1.tga by using the partial virtual path image_1.tga, now you should get the full virtual path first:
// transform partial virtual to full virtual path
String resolved_path = FileSystem::resolvePartialVirtualPath("image_1.tga"); // project/image_1.tga is returned
// use the resolved path
Image::create(resolved_path);
JointWheel Class
UNIGINE 2.7.1 | UNIGINE 2.7.2 |
---|---|
setWheelWidth() | Removed. |
getWheelWidth() | Removed. |
Light Class
LightEnvironmentProbe Class
LightVoxelProbe Class
Material Class
UNIGINE 2.7.1 | UNIGINE 2.7.2 |
---|---|
checkShader() | Removed. |
Math Matrix Functions
UNIGINE 2.7.1 | UNIGINE 2.7.2 |
---|---|
lookAt() | Set of arguments changed. |
setTo() | Set of arguments changed. |
New Functions and Variables
Node Class
UNIGINE 2.7.1 | UNIGINE 2.7.2 |
---|---|
AXIS_X | Moved to Unigine::Math namespace. |
AXIS_Y | Moved to Unigine::Math namespace. |
AXIS_Z | Moved to Unigine::Math namespace. |
AXIS_NX | Moved to Unigine::Math namespace. |
AXIS_NY | Moved to Unigine::Math namespace. |
AXIS_NZ | Moved to Unigine::Math namespace. |
setSpatial() | Renamed setPortalCullingEnabled(). |
isSpatial() | Renamed isPortalCullingEnabled(). |
As the AXIS_* variables have been moved to the Unigine::Math namespace, you should manually migrate your code:
- On the C++ side, replace all Node::AXIS_* variables with Math::AXIS_*.
- On the C# side, replace all Node.AXIS_* with MathLib.AXIS_*.
- On the UnigineScript side, replace all NODE_AXIS_* with AXIS_*.
ObjectGrass Class
ObjectParticles Class
ObjectSky Class
UNIGINE 2.7.1 | UNIGINE 2.7.2 |
---|---|
setDensityImageName() | Removed. |
getDensityImageName() | Removed. |
setDensityLayer() | Removed. |
getDensityLayer() | Removed. |
setDensityOffset() | Removed. |
getDensityOffset() | Removed. |
setDensityVelocity() | Removed. |
getDensityVelocity() | Removed. |
setDistribute() | Removed. |
getDistribute() | Removed. |
setExtinction() | Removed. |
getExtinction() | Removed. |
setHumidity() | Removed. |
getHumidity() | Removed. |
setMaxSlices() | Removed. |
getMaxSlices() | Removed. |
setMinSlices() | Removed. |
getMinSlices() | Removed. |
setSimulation() | Removed. |
getSimulation() | Removed. |
setSize() | Removed. |
getSize() | Removed. |
setTransition() | Removed. |
getTransition() | Removed. |
Player Class
Plugin Class
Property Class
UNIGINE 2.7.1 | UNIGINE 2.7.2 |
---|---|
getParameterFile() | Return value type and set of arguments changed. |
New Functions
Render Class
RenderState Class
UNIGINE 2.7.1 | UNIGINE 2.7.2 |
---|---|
setBlendFunc() | Set of arguments changed. |
New Functions
- setAnisotropy()
- getAnisotropy()
- setBlendFuncBuffer()
- getBlendDestFuncBuffer()
- getBlendSrcFuncBuffer()
- getBlendOperation()
- getBlendOperationBuffer()
- BLEND_OP_ADD
- BLEND_OP_SUBTRACT
- BLEND_OP_REVERSE_SUBTRACT
- BLEND_OP_MIN
- BLEND_OP_MAX
- DEPTH_NOT_EQUAL
- STENCIL_LESS
- STENCIL_LESS_EQUAL
- STENCIL_GREATER
- STENCIL_NOT_EQUAL
- STENCIL_GREATER_EQUAL
Shape Class
ShapeCapsule Class
ShapeSphere Class
SoundSource Class
vec3 Class
UNIGINE 2.7.1 | UNIGINE 2.7.2 |
---|---|
FORWARD | Changed to (0,1,0). To get the same behavior, use vec3::BACK. |
BACK | Changed to (0,-1,0). To get the same behavior, use vec3::FORWARD. |
RIGHT | Changed to (1,0,0). To get the same behavior, use vec3::LEFT. |
LEFT | Changed to (-1,0,0). To get the same behavior, use vec3::RIGHT. |
dvec3 Class
UNIGINE 2.7.1 | UNIGINE 2.7.2 |
---|---|
FORWARD | Changed to (0,1,0). To get the same behavior, use dvec3::BACK. |
BACK | Changed to (0,-1,0). To get the same behavior, use dvec3::FORWARD. |
RIGHT | Changed to (1,0,0). To get the same behavior, use dvec3::LEFT. |
LEFT | Changed to (-1,0,0). To get the same behavior, use dvec3::RIGHT. |
SplineGraph Class
UNIGINE 2.7.1 | UNIGINE 2.7.2 |
---|---|
removePoint() | Set of arguments changed. |
removeSegment() | Set of arguments changed. |
New Functions
String Class
WorldSplineGraph Class
Syncker Plugin
UNIGINE 2.7.1 | UNIGINE 2.7.2 |
---|---|
MasterInterface::setTCPUserReceiveCallback() | Removed. Use the following instead: addCallback(Syncker::MasterInterface::TCP_USER_RECEIVE, ...) |
MasterInterface::setUDPUserSendCallback() | Removed. Use the following instead: addCallback(Syncker::MasterInterface::UDP_USER_SEND, ...) |
MasterInterface:: setMasterSetupChangedCallback() | Removed. Use the following instead: addCallback(Syncker::MasterInterface::MASTER_SETUP_CHANGED, ...) |
MasterInterface:: setSlaveSetupChangedCallback() | Removed. Use the following instead: addCallback(Syncker::MasterInterface::SLAVE_SETUP_CHANGED, ...) |
SlaveInterface::setTCPUserReceiveCallback() | Removed. Use the following instead: addCallback(Syncker::SlaveInterface::TCP_USER_RECEIVE, ...) |
SlaveInterface::setUDPUserReceiveCallback() | Removed. Use the following instead: addCallback(Syncker::SlaveInterface::UDP_USER_RECEIVE, ...) |
New Functions
- Syncker::ManagerInterface::setDebugWindow()
- Syncker::ManagerInterface::isDebugWindow()
- Syncker::SynckerInterface::addCallback()
- Syncker::SynckerInterface::removeCallback()
- Syncker::SynckerInterface::clearCallbacks()
- Syncker::SynckerInterface::isInterpolation()
- Syncker::MasterInterface::isSyncNode()
- Syncker::MasterInterface::isNodeCreated()
- Syncker::SlaveInterface::getSlaveNodeID()
- Syncker::SlaveInterface::getMasterNodeID()
- Syncker::MasterInterface::TCP_USER_RECEIVE
- Syncker::MasterInterface::UDP_USER_SEND
- Syncker::MasterInterface::MASTER_SETUP_CHANGED
- Syncker::MasterInterface::SLAVE_SETUP_CHANGED
- Syncker::SlaveInterface::TCP_USER_RECEIVE
- Syncker::SlaveInterface::UDP_USER_RECEIVE