This page has been translated automatically.
UnigineScript
The Language
Core Library
Engine Library
Node-Related Classes
GUI-Related Classes
Plugins Library
High-Level Systems
Samples
Usage Examples
C++ API
API Reference
Integration Samples
Usage Examples
C++ Plugins
Migration
Migrating to UNIGINE 2.0
C++ API Migration
Migrating from UNIGINE 2.0 to UNIGINE 2.1
Warning! This version of documentation is OUTDATED, as it describes an older SDK version! Please switch to the documentation for the latest SDK version.
Warning! This version of documentation describes an old SDK version which is no longer supported! Please upgrade to the latest SDK version.

Engine Functions

engine.app Functions

engine.editor Functions

UNIGINEUNIGINE 2
Node engine.editor.getIntersection(vec3 p0, vec3 p1, int exclude_id, int ret_id) Node engine.editor.getIntersection(vec3 p0, vec3 p1, int exclude[] = [], variable v)
See remarks below.
Node engine.editor.getIntersection(vec3 p0, vec3 p1, int ret_id) Node engine.editor.getIntersection(vec3 p0, vec3 p1, variable v)
See remarks below.
int engine.editor.renderLightMapDirect(Object object, int surfaces = [], int blur, int width, int height, Image image) Removed
int engine.editor.renderLightMapIndirect(Object object, int surfaces = [], int samples, float radius, int width, int height, Image image) Removed

Remarks:

  1. The new function receives an array of objects IDs to exclude instead of an ID of such array. Also the result of intersection is now put into an instance of one of the following types:
  2. In UNIGINE, the result of intersection was stored in the array with the given identifier (the 3rd argument). In UNIGINE 2, the result is put into an instance of one of the following types:

New Functions

engine.filesystem Functions

UNIGINEUNIGINE 2
int engine.filesystem.addBufferFile(string name)int engine.filesystem.addBlobFile(string name)
int engine.filesystem.isBufferFile(string name)int engine.filesystem.isBlobFile(string name)
int engine.filesystem.removeBufferFile(string name)int engine.filesystem.removeBlobFile(string name)

New Functions

engine.game Functions

UNIGINEUNIGINE 2
Obstacle engine.game.getIntersection(vec3 p0, vec3 p1, float radius, int mask, int ret_id) Obstacle engine.game.getIntersection(vec3 p0, vec3 p1, float radius, int mask, GameIntersection intersection)
See remarks below.
Obstacle engine.game.getIntersection(vec3 p0, vec3 p1, float radius, int mask, int exclude_id, int ret_id) Obstacle engine.game.getIntersection(vec3 p0, vec3 p1, float radius, int mask, int exclude[] = [], GameIntersection intersection)
See remarks below.

Remarks:

  1. In UNIGINE, the result of intersection was stored in the array with the given identifier (the 4th argument). In UNIGINE 2, the result is put into an instance of the GameIntersection class.
  2. The new function receives an array of objects IDs to exclude instead of an ID of such array. Also the result of intersection is now put into an instance of the GameIntersection class.

New Functions

engine.gui Functions

UNIGINEUNIGINE 2
int engine.gui.getNumChilds() int engine.gui.getNumChildren()
See details below

Remarks:

  1. The int engine.gui.getNumChilds() function is depricated. It is provided to keep your code working until the next release. Please, replace it with int engine.gui.getNumChildren().

New Functions

engine.materials Functions

engine.physics Functions

UNIGINEUNIGINE 2
Object engine.physics.getIntersection(vec3 p0, vec3 p1, int mask, int ret_id) Object engine.physics.getIntersection(vec3 p0, vec3 p1, int mask, variable v)
See remarks below.

Remarks:

  1. In UNIGINE, the result of intersection was stored in the array with the given identifier (the 4th argument). In UNIGINE 2, the result is put into an instance of one of the following types:

New Functions

engine.properties Functions

engine.render Functions

UNIGINEUNIGINE 2
int engine.render.isAPPLE()Removed
int engine.render.isARM()Removed
int engine.render.isATI()Removed
int engine.render.isIMGTEC()Removed
int engine.render.isINTEL()Removed
int engine.render.isNVIDIA()Removed
int engine.render.isQUALCOMM()Removed
API_DIRECT3D119DIRECT3D 11 API of DirectX 9 level is not supported.
API_DIRECT3D9DIRECT3D 9 API is not supported.
int engine.render.getTranslucent()Removed
int engine.render.getDeferred()Removed
int engine.render.getLightProb()Removed
int engine.render.getOcclusion()Removed
int engine.render.getGlow()Removed
void engine.render.setLightProbMask(int maskRemoved
int engine.render.getLightProbMask()Removed
void engine.render.setLightProbDistance(float distance)Removed
float engine.render.getLightProbDistance()Removed
void engine.render.setLightProbAttenuation(float attenuation)Removed
float engine.render.getLightProbAttenuation()Removed
void engine.render.setLightProbFresnelBias(float bias)Removed
float engine.render.getLightProbFresnelBias()Removed
void engine.render.setLightProbFresnelPower(float power)Removed
float engine.render.getLightProbFresnelPower()Removed
void engine.render.setLightProbDiffuseScale(float scale)Removed
float engine.render.getLightProbDiffuseScale() Removed
void engine.render.setLightProbSpecularScale(float scale)Removed
float engine.render.getLightProbSpecularScale()Removed
void engine.render.setOcclusionAmbientScreenRadius(float radius)Removed
float engine.render.getOcclusionAmbientScreenRadius()Removed
void engine.render.setOcclusionAmbientSampleRadius(float radius)Removed
float engine.render.getOcclusionAmbientSampleRadius()Removed
void engine.render.setOcclusionAmbientPerspective(float perspective)Removed
float engine.render.getOcclusionAmbientPerspective()Removed
void engine.render.setOcclusionAmbientAttenuation(float attenuation)Removed
float engine.render.getOcclusionAmbientAttenuation()Removed
void engine.render.setOcclusionAmbientThreshold(float threshold)Removed
float engine.render.getOcclusionAmbientThreshold()Removed
void engine.render.setOcclusionAmbientEmitter(float emitter)Removed
float engine.render.getOcclusionAmbientEmitter()Removed
void engine.render.setOcclusionAmbientReceiver(float value)Removed
float engine.render.getOcclusionAmbientReceiver()Removed
void engine.render.setOcclusionAmbientScale(float scale)Removed
float engine.render.getOcclusionAmbientScale()Removed
void engine.render.setOcclusionAmbientPower(float power)Removed
float engine.render.getOcclusionAmbientPower()Removed
void engine.render.setOcclusionLightScreenRadius(float radius)Removed
float engine.render.getOcclusionLightScreenRadius()Removed
void engine.render.setOcclusionLightSampleRadius(float radius)Removed
float engine.render.getOcclusionLightSampleRadius()Removed
void engine.render.setOcclusionLightPerspective(float perspective)Removed
float engine.render.getOcclusionLightPerspective()Removed
void engine.render.setOcclusionLightAttenuation(float attenuation)Removed
float engine.render.getOcclusionLightAttenuation()Removed
void engine.render.setOcclusionLightThreshold(float threshold)Removed
float engine.render.getOcclusionLightThreshold()Removed
void engine.render.setOcclusionLightEmitter(float emitter)Removed
float engine.render.getOcclusionLightEmitter()Removed
void engine.render.setOcclusionLightReceiver(float value)Removed
float engine.render.getOcclusionLightReceiver()Removed
void engine.render.setOcclusionLightScale(float scale)Removed
float engine.render.getOcclusionLightScale()Removed
void engine.render.setOcclusionLightPower(float power)Removed
float engine.render.getOcclusionLightPower()Removed
void engine.render.setMotionBlurLinearScale(float scale)Removed
float engine.render.getMotionBlurLinearScale()Removed
void engine.render.setMotionBlurAngularScale(float scale)Removed
float engine.render.getMotionBlurAngularScale()Removed
void engine.render.setGlowThreshold(float threshold)Removed
float engine.render.getGlowThreshold()Removed
void engine.render.setGlowSmallExposure(float exposure)Removed
float engine.render.getGlowSmallExposure()Removed
void engine.render.setGlowMediumExposure(float exposure)Removed
float engine.render.getGlowMediumExposure()Removed
void engine.render.setGlowLargeExposure(float exposure)Removed
float engine.render.getGlowLargeExposure()Removed
int engine.render.getHDR()Removed
void engine.render.setHDRSmallExposure(float exposure)Removed
float engine.render.getHDRSmallExposure()Removed
void engine.render.setHDRMediumExposure(float exposure)Removed
float engine.render.getHDRMediumExposure()Removed
void engine.render.setHDRLargeExposure(float exposure)Removed
float engine.render.getHDRLargeExposure()Removed
int engine.render.getShaders()int engine.render.getShadersQuality()
int engine.render.getTextures()int engine.render.getTexturesQuality()
void engine.render.setHDRThreshold(float threshold)void engine.render.setCameraEffectsThreshold(float threshold)
float engine.render.getHDRThreshold()float engine.render.getCameraEffectsThreshold()
int engine.render.setHDRLensTextureName(string name)int engine.render.setDirtTextureName(string name)
string engine.render.getHDRLensTextureName()string engine.render.getDirtTextureName()
void engine.render.setHDRExposure(float exposure)void engine.render.setExposure(float exposure)
float engine.render.getHDRExposure()float engine.render.getExposure()
void engine.render.setHDRAdaptation(float period)void engine.render.setExposureAdaptation(float period)
float engine.render.getHDRAdaptation()float engine.render.getExposureAdaptation()
void engine.render.setHDRMinLuminance(float luminance)void engine.render.setExposureMinLuminance(float luminance)
float engine.render.getHDRMinLuminance()float engine.render.getExposureMinLuminance()
void engine.render.setHDRMaxLuminance(float luminance)void engine.render.setExposureMaxLuminance(float luminance)
float engine.render.getHDRMaxLuminance()float engine.render.getExposureMaxLuminance()
void engine.render.setHDRBrightExposure(float exposure)void engine.render.setExposureBright(float exposure)
float engine.render.getHDRBrightExposure()float engine.render.getExposureBright()
void engine.render.setHDRFilmicShoulderScale(float scale) void engine.render.setFilmicShoulderScale(float scale)
float engine.render.getHDRFilmicShoulderScale()float engine.render.getFilmicShoulderScale()
void engine.render.setHDRFilmicLinearScale(float scale)void engine.render.setFilmicLinearScale(float scale)
float engine.render.getHDRFilmicLinearScale()float engine.render.getFilmicLinearScale()
void engine.render.setHDRFilmicLinearAngle(float angle)void engine.render.setFilmicLinearAngle(float angle)
float engine.render.getHDRFilmicLinearAngle()float engine.render.getFilmicLinearAngle()
void engine.render.setHDRFilmicToeScale(float scale)void engine.render.setFilmicToeScale(float scale)
float engine.render.getHDRFilmicToeScale()float engine.render.getFilmicToeScale()
void engine.render.setHDRFilmicToeNumerator(float scale)void engine.render.setFilmicToeNumerator(float scale)
float engine.render.getHDRFilmicToeNumerator()float engine.render.getFilmicToeNumerator()
void engine.render.setHDRFilmicToeDenominator(float scale)void engine.render.setFilmicToeDenominator(float scale)
float engine.render.getHDRFilmicToeDenominator()float engine.render.getFilmicToeDenominator()
void engine.render.setHDRFilmicWhiteLevel(float scale)void engine.render.setFilmicWhiteLevel(float scale)
float engine.render.getHDRFilmicWhiteLevel()float engine.render.getFilmicWhiteLevel()
void engine.render.setHDRCrossEnabled(int mode)void engine.render.setCrossEnabled(int mode)
int engine.render.isHDRCrossEnabled()int engine.render.isCrossEnabled()
void engine.render.setHDRCrossColor(vec4 color)void engine.render.setCrossColor(vec4 color)
vec4 engine.render.getHDRCrossColor()vec4 engine.render.getCrossColor()
void engine.render.setHDRCrossScale(float scale)void engine.render.setCrossScale(float scale)
float engine.render.getHDRCrossScale()float engine.render.getCrossScale()
void engine.render.setHDRCrossLength(float length)void engine.render.setCrossLength(float length)
float engine.render.getHDRCrossLength()float engine.render.getCrossLength()
void engine.render.setHDRCrossShafts(int amount)void engine.render.setCrossShafts(int amount)
int engine.render.getHDRCrossShafts()int engine.render.getCrossShafts()
void engine.render.setHDRCrossAngle(float angle)void engine.render.setCrossAngle(float angle)
float engine.render.getHDRCrossAngle()float engine.render.getCrossAngle()
void engine.render.setHDRCrossThreshold(float threshold)void engine.render.setCrossThreshold(float threshold)
float engine.render.getHDRCrossThreshold()float engine.render.getCrossThreshold()
void engine.render.setHDRBokehEnabled(int enable)void engine.render.setBokehEnabled(int enable)
int engine.render.isHDRBokehEnabled()int engine.render.isBokehEnabled()
void engine.render.setHDRBokehColor(vec4 color)void engine.render.setBokehColor(vec4 color)
vec4 engine.render.getHDRBokehColor()vec4 engine.render.getBokehColor()
void engine.render.setHDRBokehScale(float scale)void engine.render.setBokehScale(float scale)
float engine.render.getHDRBokehScale()float engine.render.getBokehScale()
void engine.render.setHDRBokehFarSize(float size)void engine.render.setBokehFarSize(float size)
float engine.render.getHDRBokehFarSize()float engine.render.getBokehFarSize()
void engine.render.setHDRBokehFarPower(float power)void engine.render.setBokehFarPower(float power)
float engine.render.getHDRBokehFarPower()float engine.render.getBokehFarPower()
void engine.render.setHDRBokehNearSize(float size)void engine.render.setBokehNearSize(float size)
float engine.render.getHDRBokehNearSize()float engine.render.getBokehNearSize()
void engine.render.setHDRBokehNearPower(float power)void engine.render.setBokehNearPower(float power)
float engine.render.getHDRBokehNearPower()float engine.render.getBokehNearPower()
void engine.render.setHDRBokehThreshold(float threshold)void engine.render.setBokehThreshold(float threshold)
float engine.render.getHDRBokehThreshold()float engine.render.getBokehThreshold()
int engine.render.setHDRBokehTextureName(string name)int engine.render.setBokehTextureName(string name)
string engine.render.getHDRBokehTextureName()string engine.render.getBokehTextureName()
void engine.render.setHDRShaftEnabled(int enable)void engine.render.setSunShaftsEnabled(int enable)
int engine.render.isHDRShaftEnabled()int engine.render.isSunShaftsEnabled()
void engine.render.setHDRShaftColor(vec4 color)void engine.render.setSunShaftsColor(vec4 color)
vec4 engine.render.getHDRShaftColor()vec4 engine.render.getSunShaftsColor()
void engine.render.setHDRShaftScale(float scale)void engine.render.setSunShaftsScale(float scale)
float engine.render.getHDRShaftScale()float engine.render.getSunShaftsScale()
void engine.render.setHDRShaftLength(float length)void engine.render.setSunShaftsLength(float length)
float engine.render.getHDRShaftLength()float engine.render.getSunShaftsLength()
void engine.render.setHDRShaftAttenuation(float value)void engine.render.setSunShaftsAttenuation(float value)
float engine.render.getHDRShaftAttenuation()float engine.render.getSunShaftsAttenuation()
void engine.render.setHDRShaftThreshold(float threshold)void engine.render.setSunShaftsThreshold(float threshold)
float engine.render.getHDRShaftThreshold()float engine.render.getSunShaftsThreshold()
void engine.render.setHDRLensEnabled(int mode)void engine.render.setLensEnabled(int mode)
int engine.render.isHDRLensEnabled()int engine.render.isLensEnabled()
void engine.render.setHDRLensColor(vec4 color)void engine.render.setLensColor(vec4 color)
vec4 engine.render.getHDRLensColor()vec4 engine.render.getLensColor()
void engine.render.setHDRLensScale(float scale)void engine.render.setLensScale(float scale)
float engine.render.getHDRLensScale()float engine.render.getLensScale()
void engine.render.setHDRLensLength(float length)void engine.render.setLensLength(float length)
float engine.render.getHDRLensLength()float engine.render.getLensLength()
void engine.render.setHDRLensRadius(float radius)void engine.render.setLensRadius(float radius)
float engine.render.getHDRLensRadius()float engine.render.getLensRadius()
void engine.render.setHDRLensThreshold(float threshold)void engine.render.setLensThreshold(float threshold)
float engine.render.getHDRLensThreshold()float engine.render.getLensThreshold()
void engine.render.setHDRLensDispersion(vec3 dispersion)void engine.render.setLensDispersion(vec3 dispersion)
vec3 engine.render.getHDRLensDispersion()vec3 engine.render.getLensDispersion()
int engine.render.getVolumetric()int engine.render.getShadowShafts()
void engine.render.setVolumetricExposure(float exposure)void engine.render.setShadowShaftsExposure(float exposure)
float engine.render.getVolumetricExposure()float engine.render.getShadowShaftsExposure()
void engine.render.setVolumetricLength(float length)void engine.render.setShadowShaftsLength(float length)
float engine.render.getVolumetricLength()float engine.render.getShadowShaftsLength()
void engine.render.setVolumetricAttenuation(float value)void engine.render.setShadowShaftsAttenuation(float value)
float engine.render.getVolumetricAttenuation() float engine.render.getShadowShaftsAttenuation()
APPLE_A7
APPLE_A8
APPLE_UNKNOWN
GPU_APPLE
ARM_MALI400
ARM_UNKNOWN
GPU_ARM
ATI_R300
ATI_R400
ATI_R500
ATI_R600
ATI_R700
ATI_R800
ATI_R900
ATI_UNKNOWN
ATI_X200
GPU_AMD
IMGTEC_SGX530
IMGTEC_SGX540
IMGTEC_UNKNOWN
GPU_IMGTEC
INTEL_HD
INTEL_UNKNOWN
GPU_INTEL
NVIDIA_NV40
NVIDIA_NV50
NVIDIA_NV60
NVIDIA_NV70
NVIDIA_NV80
NVIDIA_TEGRA2
NVIDIA_TEGRA3
NVIDIA_TEGRA4
NVIDIA_UNKNOWN
GPU_NVIDIA
QUALCOMM_ADRENO205
QUALCOMM_ADRENO220
QUALCOMM_ADRENO225
QUALCOMM_ADRENO305
QUALCOMM_ADRENO320
QUALCOMM_ADRENO330
QUALCOMM_UNKNOWN
GPU_QUALCOMM
RENDER_BOX
RENDER_DODECAHEDRON
RENDER_ICOSAHEDRON
RENDER_SPHERE
Removed
RENDER_OCCLUSION_DISABLED
RENDER_OCCLUSION_AMBIENT
RENDER_OCCLUSION_LIGHT
RENDER_OCCLUSION_AMBIENT_LIGHT
Removed
RENDER_HDR_DISABLEDRENDER_EXPOSURE_DISABLED
RENDER_HDR_LOGARITHMICRENDER_EXPOSURE_LOGARITHMIC
RENDER_HDR_QUADRATIC"RENDER_EXPOSURE_QUADRATIC

New Functions and Variables

engine.sound Functions

engine.splash Functions

engine.visualizer Functions

UNIGINEUNIGINE 2
void engine.visualizer.renderBoundBox(vec3 min, vec3 max, mat4 transform, vec4 color)void engine.visualizer.renderBoundBox(BoundBox bb, mat4 transform, vec4 color)
See remarks below.
void engine.visualizer.renderBoundSphere(vec3 center, float radius, mat4 transform, vec4 color)void engine.visualizer.renderBoundSphere(BoundSphere bs, mat4 transform, vec4 color)
See remarks below.
void engine.visualizer.renderLightProbHandler(LightProb light, float radius, vec4 color)Removed

Remarks:

  1. The new function receives an instance of the BoundBox class instead of bounding box minimum and maximum.
  2. The new function receives an instance of the BoundSphere instead of bounding sphere center and radius.

New Functions

engine.world Functions

UNIGINEUNIGINE 2
int engine.world.getCollisionObjectsVariable(variable p0, variable p1, int ret_id) int engine.world.getCollisionObjectVariables(variable v, int ret[] = [])
See the 1st remark below.
int engine.world.getCollisionObjects(variable p0, variable p1, int ret_id) int engine.world.getCollisionObjects(variable v, int ret[] = [])
See the 1st remark below.
int engine.world.getIntersectionNodesVariable(variable p0, variable p1, int type, int ret[]) int engine.world.getIntersectionNodeVariables(variable v, int type, int ret[] = [])
See the 1st remark below.
int engine.world.getIntersectionNodes(variable p0, variable p1, int type, int ret[]) int engine.world.getIntersectionNodes(variable v, int type, int ret[] = [])
See the 1st remark below.
int engine.world.getIntersectionObjectsVariable(variable p0, variable p1, int ret[]) int engine.world.getIntersectionObjectVariables(variable v, int ret[] = [])
See the 1st remark below.
int engine.world.getIntersectionObjects(variable p0, variable p1, int ret[]) int engine.world.getIntersectionObjects(variable v, int ret[] = [])
See the 1st remark below.
int engine.world.getIntersection(vec3 p0, vec3 p1, int ret[]) int engine.world.getIntersectionObjects(vec3 p0, vec3 p1, int ret[] = [])
See the 2nd remark below.
Object engine.world.getIntersection(vec3 p0, vec3 p1, int mask, int ret[]) Object engine.world.getIntersection(vec3 p0, vec3 p1, int mask, variable v)
See the 3rd remark below.
Object engine.world.getIntersection(vec3 p0, vec3 p1, int mask, int exclude[], int ret[]) Object engine.world.getIntersection(vec3 p0, vec3 p1, int mask, int exclude[] = [], variable v)
See the 3rd remark below.

Notice
An additional information on world intersections can be found here.

Remarks:

  1. The new function receives an instance of the BoundBox/Sphere/Frustum class as the first argument.
  2. Renamed. The function searches for all objects intersected by the given line.
  3. The result of intersection is put into an instance of one of the following classes:

New Functions

Last update: 2017-07-03
Build: ()