Resource for environment nodes (like godot.WorldEnvironment) that define multiple environment operations (such as background godot.Sky or godot.Color, ambient light, fog, depth-of-field...). These parameters affect the final render of the scene. The order of these operations is:

  • Depth of Field Blur

  • Glow

  • Tonemap (Auto Exposure)

  • Adjustments

If the target godot.Viewport is set to "2D Without Sampling", all post-processing effects will be unavailable. With "3D Without Effects", the following options will be unavailable:

  • Ssao

  • Ss Reflections

This can be configured for the root Viewport with , or for specific Viewports via the godot.Viewport.usage property.

Note that has a mobile platform override to use "3D Without Effects" by default. It improves the performance on mobile devices, but at the same time affects the screen display on mobile devices.

Constructor

@:native("new")new()

Variables

@:native("AdjustmentBrightness")adjustmentBrightness:Single

The global brightness value of the rendered scene. Effective only if adjustment_enabled is true.

@:native("AdjustmentColorCorrection")adjustmentColorCorrection:Texture

Applies the provided godot.Texture resource to affect the global color aspect of the rendered scene. Effective only if adjustment_enabled is true.

@:native("AdjustmentContrast")adjustmentContrast:Single

The global contrast value of the rendered scene (default value is 1). Effective only if adjustment_enabled is true.

@:native("AdjustmentEnabled")adjustmentEnabled:Bool

If true, enables the adjustment_* properties provided by this resource. If false, modifications to the adjustment_* properties will have no effect on the rendered scene.

@:native("AdjustmentSaturation")adjustmentSaturation:Single

The global color saturation value of the rendered scene (default value is 1). Effective only if adjustment_enabled is true.

@:native("AmbientLightColor")ambientLightColor:Color

The ambient light's godot.Color.

@:native("AmbientLightEnergy")ambientLightEnergy:Single

The ambient light's energy. The higher the value, the stronger the light.

@:native("AmbientLightSkyContribution")ambientLightSkyContribution:Single

Defines the amount of light that the sky brings on the scene. A value of 0.0 means that the sky's light emission has no effect on the scene illumination, thus all ambient illumination is provided by the ambient light. On the contrary, a value of 1.0 means that all the light that affects the scene is provided by the sky, thus the ambient light parameter has no effect on the scene.

Note: godot.Environment.ambientLightSkyContribution is internally clamped between 0.0 and 1.0 (inclusive).

@:native("AutoExposureEnabled")autoExposureEnabled:Bool

If true, enables the tonemapping auto exposure mode of the scene renderer. If true, the renderer will automatically determine the exposure setting to adapt to the scene's illumination and the observed light.

@:native("AutoExposureMaxLuma")autoExposureMaxLuma:Single

The maximum luminance value for the auto exposure.

@:native("AutoExposureMinLuma")autoExposureMinLuma:Single

The minimum luminance value for the auto exposure.

@:native("AutoExposureScale")autoExposureScale:Single

The scale of the auto exposure effect. Affects the intensity of auto exposure.

@:native("AutoExposureSpeed")autoExposureSpeed:Single

The speed of the auto exposure effect. Affects the time needed for the camera to perform auto exposure.

@:native("BackgroundCameraFeedId")backgroundCameraFeedId:Int

The ID of the camera feed to show in the background.

@:native("BackgroundCanvasMaxLayer")backgroundCanvasMaxLayer:Int

The maximum layer ID to display. Only effective when using the godot.Environment_BGMode.canvas background mode.

@:native("BackgroundColor")backgroundColor:Color

The godot.Color displayed for clear areas of the scene. Only effective when using the godot.Environment_BGMode.color or godot.Environment_BGMode.colorSky background modes).

@:native("BackgroundEnergy")backgroundEnergy:Single

The power of the light emitted by the background.

@:native("BackgroundMode")backgroundMode:Environment_BGMode

The background mode. See godot.Environment_BGMode for possible values.

@:native("BackgroundSky")backgroundSky:Sky

The godot.Sky resource defined as background.

@:native("BackgroundSkyCustomFov")backgroundSkyCustomFov:Single

The godot.Sky resource's custom field of view.

@:native("BackgroundSkyOrientation")backgroundSkyOrientation:Basis

The godot.Sky resource's rotation expressed as a godot.Basis.

@:native("BackgroundSkyRotation")backgroundSkyRotation:Vector3

The godot.Sky resource's rotation expressed as Euler angles in radians.

@:native("BackgroundSkyRotationDegrees")backgroundSkyRotationDegrees:Vector3

The godot.Sky resource's rotation expressed as Euler angles in degrees.

@:native("DofBlurFarAmount")dofBlurFarAmount:Single

The amount of far blur for the depth-of-field effect.

@:native("DofBlurFarDistance")dofBlurFarDistance:Single

The distance from the camera where the far blur effect affects the rendering.

@:native("DofBlurFarEnabled")dofBlurFarEnabled:Bool

If true, enables the depth-of-field far blur effect.

@:native("DofBlurFarQuality")dofBlurFarQuality:Environment_DOFBlurQuality

The depth-of-field far blur's quality. Higher values can mitigate the visible banding effect seen at higher strengths, but are much slower.

@:native("DofBlurFarTransition")dofBlurFarTransition:Single

The length of the transition between the no-blur area and far blur.

@:native("DofBlurNearAmount")dofBlurNearAmount:Single

The amount of near blur for the depth-of-field effect.

@:native("DofBlurNearDistance")dofBlurNearDistance:Single

Distance from the camera where the near blur effect affects the rendering.

@:native("DofBlurNearEnabled")dofBlurNearEnabled:Bool

If true, enables the depth-of-field near blur effect.

@:native("DofBlurNearQuality")dofBlurNearQuality:Environment_DOFBlurQuality

The depth-of-field near blur's quality. Higher values can mitigate the visible banding effect seen at higher strengths, but are much slower.

@:native("DofBlurNearTransition")dofBlurNearTransition:Single

The length of the transition between the near blur and no-blur area.

@:native("FogColor")fogColor:Color

The fog's godot.Color.

@:native("FogDepthBegin")fogDepthBegin:Single

The fog's depth starting distance from the camera.

@:native("FogDepthCurve")fogDepthCurve:Single

The fog depth's intensity curve. A number of presets are available in the Inspector by right-clicking the curve.

@:native("FogDepthEnabled")fogDepthEnabled:Bool

If true, the depth fog effect is enabled. When enabled, fog will appear in the distance (relative to the camera).

@:native("FogDepthEnd")fogDepthEnd:Single

The fog's depth end distance from the camera. If this value is set to 0, it will be equal to the current camera's godot.Camera.far value.

@:native("FogEnabled")fogEnabled:Bool

If true, fog effects are enabled. godot.Environment.fogHeightEnabled and/or godot.Environment.fogDepthEnabled must be set to true to actually display fog.

@:native("FogHeightCurve")fogHeightCurve:Single

The height fog's intensity. A number of presets are available in the Inspector by right-clicking the curve.

@:native("FogHeightEnabled")fogHeightEnabled:Bool

If true, the height fog effect is enabled. When enabled, fog will appear in a defined height range, regardless of the distance from the camera. This can be used to simulate "deep water" effects with a lower performance cost compared to a dedicated shader.

@:native("FogHeightMax")fogHeightMax:Single

The Y coordinate where the height fog will be the most intense. If this value is greater than godot.Environment.fogHeightMin, fog will be displayed from bottom to top. Otherwise, it will be displayed from top to bottom.

@:native("FogHeightMin")fogHeightMin:Single

The Y coordinate where the height fog will be the least intense. If this value is greater than godot.Environment.fogHeightMax, fog will be displayed from top to bottom. Otherwise, it will be displayed from bottom to top.

@:native("FogSunAmount")fogSunAmount:Single

The intensity of the depth fog color transition when looking towards the sun. The sun's direction is determined automatically using the DirectionalLight node in the scene.

@:native("FogSunColor")fogSunColor:Color

The depth fog's godot.Color when looking towards the sun.

@:native("FogTransmitCurve")fogTransmitCurve:Single

The intensity of the fog light transmittance effect. Amount of light that the fog transmits.

@:native("FogTransmitEnabled")fogTransmitEnabled:Bool

Enables fog's light transmission effect. If true, light will be more visible in the fog to simulate light scattering as in real life.

@:native("GlowBicubicUpscale")glowBicubicUpscale:Bool

Smooths out the blockiness created by sampling higher levels, at the cost of performance.

Note: When using the GLES2 renderer, this is only available if the GPU supports the GL_EXT_gpu_shader4 extension.

@:native("GlowBlendMode")glowBlendMode:Environment_GlowBlendModeEnum

The glow blending mode.

@:native("GlowBloom")glowBloom:Single

The bloom's intensity. If set to a value higher than 0, this will make glow visible in areas darker than the godot.Environment.glowHdrThreshold.

@:native("GlowEnabled")glowEnabled:Bool

If true, the glow effect is enabled.

Note: Only effective if is 3D (not 3D Without Effects). On mobile, defaults to 3D Without Effects by default, so its .mobile override needs to be changed to 3D.

Note: When using GLES3 on mobile, HDR rendering is disabled by default for performance reasons. This means glow will only be visible if godot.Environment.glowHdrThreshold is decreased below 1.0 or if godot.Environment.glowBloom is increased above 0.0. Also consider increasing godot.Environment.glowIntensity to 1.5. If you want glow to behave on mobile like it does on desktop (at a performance cost), enable 's .mobile override.

@:native("GlowHdrLuminanceCap")glowHdrLuminanceCap:Single

The higher threshold of the HDR glow. Areas brighter than this threshold will be clamped for the purposes of the glow effect.

@:native("GlowHdrScale")glowHdrScale:Single

The bleed scale of the HDR glow.

@:native("GlowHdrThreshold")glowHdrThreshold:Single

The lower threshold of the HDR glow. When using the GLES2 renderer (which doesn't support HDR), this needs to be below 1.0 for glow to be visible. A value of 0.9 works well in this case.

@:native("GlowHighQuality")glowHighQuality:Bool

Takes more samples during downsample pass of glow. This ensures that single pixels are captured by glow which makes the glow look smoother and more stable during movement. However, it is very expensive and makes the glow post process take twice as long.

@:native("GlowIntensity")glowIntensity:Single

The glow intensity. When using the GLES2 renderer, this should be increased to 1.5 to compensate for the lack of HDR rendering.

@:native("GlowLevels__1")glowLevels__1:Bool

If true, the 1st level of glow is enabled. This is the most "local" level (least blurry).

@:native("GlowLevels__2")glowLevels__2:Bool

If true, the 2th level of glow is enabled.

@:native("GlowLevels__3")glowLevels__3:Bool

If true, the 3th level of glow is enabled.

@:native("GlowLevels__4")glowLevels__4:Bool

If true, the 4th level of glow is enabled.

@:native("GlowLevels__5")glowLevels__5:Bool

If true, the 5th level of glow is enabled.

@:native("GlowLevels__6")glowLevels__6:Bool

If true, the 6th level of glow is enabled.

@:native("GlowLevels__7")glowLevels__7:Bool

If true, the 7th level of glow is enabled. This is the most "global" level (blurriest).

@:native("GlowStrength")glowStrength:Single

The glow strength. When using the GLES2 renderer, this should be increased to 1.3 to compensate for the lack of HDR rendering.

@:native("SsReflectionsDepthTolerance")ssReflectionsDepthTolerance:Single

The depth tolerance for screen-space reflections.

@:native("SsReflectionsEnabled")ssReflectionsEnabled:Bool

If true, screen-space reflections are enabled. Screen-space reflections are more accurate than reflections from godot.GIProbes or godot.ReflectionProbes, but are slower and can't reflect surfaces occluded by others.

@:native("SsReflectionsFadeIn")ssReflectionsFadeIn:Single

The fade-in distance for screen-space reflections. Affects the area from the reflected material to the screen-space reflection).

@:native("SsReflectionsFadeOut")ssReflectionsFadeOut:Single

The fade-out distance for screen-space reflections. Affects the area from the screen-space reflection to the "global" reflection.

@:native("SsReflectionsMaxSteps")ssReflectionsMaxSteps:Int

The maximum number of steps for screen-space reflections. Higher values are slower.

@:native("SsReflectionsRoughness")ssReflectionsRoughness:Bool

If true, screen-space reflections will take the material roughness into account.

@:native("SsaoAoChannelAffect")ssaoAoChannelAffect:Single

The screen-space ambient occlusion intensity on materials that have an AO texture defined. Values higher than 0 will make the SSAO effect visible in areas darkened by AO textures.

@:native("SsaoBias")ssaoBias:Single

The screen-space ambient occlusion bias. This should be kept high enough to prevent "smooth" curves from being affected by ambient occlusion.

@:native("SsaoBlur")ssaoBlur:Environment_SSAOBlur

The screen-space ambient occlusion blur quality. See godot.Environment_SSAOBlur for possible values.

@:native("SsaoColor")ssaoColor:Color

The screen-space ambient occlusion color.

@:native("SsaoEdgeSharpness")ssaoEdgeSharpness:Single

The screen-space ambient occlusion edge sharpness.

@:native("SsaoEnabled")ssaoEnabled:Bool

If true, the screen-space ambient occlusion effect is enabled. This darkens objects' corners and cavities to simulate ambient light not reaching the entire object as in real life. This works well for small, dynamic objects, but baked lighting or ambient occlusion textures will do a better job at displaying ambient occlusion on large static objects. This is a costly effect and should be disabled first when running into performance issues.

@:native("SsaoIntensity")ssaoIntensity:Single

The primary screen-space ambient occlusion intensity. See also godot.Environment.ssaoRadius.

@:native("SsaoIntensity2")ssaoIntensity2:Single

The secondary screen-space ambient occlusion intensity. See also godot.Environment.ssaoRadius2.

@:native("SsaoLightAffect")ssaoLightAffect:Single

The screen-space ambient occlusion intensity in direct light. In real life, ambient occlusion only applies to indirect light, which means its effects can't be seen in direct light. Values higher than 0 will make the SSAO effect visible in direct light.

@:native("SsaoQuality")ssaoQuality:Environment_SSAOQuality

The screen-space ambient occlusion quality. Higher qualities will make better use of small objects for ambient occlusion, but are slower.

@:native("SsaoRadius")ssaoRadius:Single

The primary screen-space ambient occlusion radius.

@:native("SsaoRadius2")ssaoRadius2:Single

The secondary screen-space ambient occlusion radius. If set to a value higher than 0, enables the secondary screen-space ambient occlusion effect which can be used to improve the effect's appearance (at the cost of performance).

@:native("TonemapExposure")tonemapExposure:Single

The default exposure used for tonemapping.

@:native("TonemapMode")tonemapMode:Environment_ToneMapper

The tonemapping mode to use. Tonemapping is the process that "converts" HDR values to be suitable for rendering on a LDR display. (Godot doesn't support rendering on HDR displays yet.)

@:native("TonemapWhite")tonemapWhite:Single

The white reference value for tonemapping. Only effective if the godot.Environment.tonemapMode isn't set to godot.Environment_ToneMapper.linear.

Methods

@:native("GetAdjustmentBrightness")getAdjustmentBrightness():Single

@:native("GetAdjustmentColorCorrection")getAdjustmentColorCorrection():Texture

@:native("GetAdjustmentContrast")getAdjustmentContrast():Single

@:native("GetAdjustmentSaturation")getAdjustmentSaturation():Single

@:native("GetAmbientLightColor")getAmbientLightColor():Color

@:native("GetAmbientLightEnergy")getAmbientLightEnergy():Single

@:native("GetAmbientLightSkyContribution")getAmbientLightSkyContribution():Single

@:native("GetBackground")getBackground():Environment_BGMode

@:native("GetBgColor")getBgColor():Color

@:native("GetBgEnergy")getBgEnergy():Single

@:native("GetCameraFeedId")getCameraFeedId():Int

@:native("GetCanvasMaxLayer")getCanvasMaxLayer():Int

@:native("GetDofBlurFarAmount")getDofBlurFarAmount():Single

@:native("GetDofBlurFarDistance")getDofBlurFarDistance():Single

@:native("GetDofBlurFarQuality")getDofBlurFarQuality():Environment_DOFBlurQuality

@:native("GetDofBlurFarTransition")getDofBlurFarTransition():Single

@:native("GetDofBlurNearAmount")getDofBlurNearAmount():Single

@:native("GetDofBlurNearDistance")getDofBlurNearDistance():Single

@:native("GetDofBlurNearQuality")getDofBlurNearQuality():Environment_DOFBlurQuality

@:native("GetDofBlurNearTransition")getDofBlurNearTransition():Single

@:native("GetFogColor")getFogColor():Color

@:native("GetFogDepthBegin")getFogDepthBegin():Single

@:native("GetFogDepthCurve")getFogDepthCurve():Single

@:native("GetFogDepthEnd")getFogDepthEnd():Single

@:native("GetFogHeightCurve")getFogHeightCurve():Single

@:native("GetFogHeightMax")getFogHeightMax():Single

@:native("GetFogHeightMin")getFogHeightMin():Single

@:native("GetFogSunAmount")getFogSunAmount():Single

@:native("GetFogSunColor")getFogSunColor():Color

@:native("GetFogTransmitCurve")getFogTransmitCurve():Single

@:native("GetGlowBlendMode")getGlowBlendMode():Environment_GlowBlendModeEnum

@:native("GetGlowBloom")getGlowBloom():Single

@:native("GetGlowHdrBleedScale")getGlowHdrBleedScale():Single

@:native("GetGlowHdrBleedThreshold")getGlowHdrBleedThreshold():Single

@:native("GetGlowHdrLuminanceCap")getGlowHdrLuminanceCap():Single

@:native("GetGlowIntensity")getGlowIntensity():Single

@:native("GetGlowStrength")getGlowStrength():Single

@:native("GetSky")getSky():Sky

@:native("GetSkyCustomFov")getSkyCustomFov():Single

@:native("GetSkyOrientation")getSkyOrientation():Basis

@:native("GetSkyRotation")getSkyRotation():Vector3

@:native("GetSkyRotationDegrees")getSkyRotationDegrees():Vector3

@:native("GetSsaoAoChannelAffect")getSsaoAoChannelAffect():Single

@:native("GetSsaoBias")getSsaoBias():Single

@:native("GetSsaoBlur")getSsaoBlur():Environment_SSAOBlur

@:native("GetSsaoColor")getSsaoColor():Color

@:native("GetSsaoDirectLightAffect")getSsaoDirectLightAffect():Single

@:native("GetSsaoEdgeSharpness")getSsaoEdgeSharpness():Single

@:native("GetSsaoIntensity")getSsaoIntensity():Single

@:native("GetSsaoIntensity2")getSsaoIntensity2():Single

@:native("GetSsaoQuality")getSsaoQuality():Environment_SSAOQuality

@:native("GetSsaoRadius")getSsaoRadius():Single

@:native("GetSsaoRadius2")getSsaoRadius2():Single

@:native("GetSsrDepthTolerance")getSsrDepthTolerance():Single

@:native("GetSsrFadeIn")getSsrFadeIn():Single

@:native("GetSsrFadeOut")getSsrFadeOut():Single

@:native("GetSsrMaxSteps")getSsrMaxSteps():Int

@:native("GetTonemapAutoExposure")getTonemapAutoExposure():Bool

@:native("GetTonemapAutoExposureGrey")getTonemapAutoExposureGrey():Single

@:native("GetTonemapAutoExposureMax")getTonemapAutoExposureMax():Single

@:native("GetTonemapAutoExposureMin")getTonemapAutoExposureMin():Single

@:native("GetTonemapAutoExposureSpeed")getTonemapAutoExposureSpeed():Single

@:native("GetTonemapExposure")getTonemapExposure():Single

@:native("GetTonemapWhite")getTonemapWhite():Single

@:native("GetTonemapper")getTonemapper():Environment_ToneMapper

@:native("IsAdjustmentEnabled")isAdjustmentEnabled():Bool

@:native("IsDofBlurFarEnabled")isDofBlurFarEnabled():Bool

@:native("IsDofBlurNearEnabled")isDofBlurNearEnabled():Bool

@:native("IsFogDepthEnabled")isFogDepthEnabled():Bool

@:native("IsFogEnabled")isFogEnabled():Bool

@:native("IsFogHeightEnabled")isFogHeightEnabled():Bool

@:native("IsFogTransmitEnabled")isFogTransmitEnabled():Bool

@:native("IsGlowBicubicUpscaleEnabled")isGlowBicubicUpscaleEnabled():Bool

@:native("IsGlowEnabled")isGlowEnabled():Bool

@:native("IsGlowHighQualityEnabled")isGlowHighQualityEnabled():Bool

@:native("IsGlowLevelEnabled")isGlowLevelEnabled(idx:Int):Bool

Returns true if the glow level idx is specified, false otherwise.

@:native("IsSsaoEnabled")isSsaoEnabled():Bool

@:native("IsSsrEnabled")isSsrEnabled():Bool

@:native("IsSsrRough")isSsrRough():Bool

@:native("SetAdjustmentBrightness")setAdjustmentBrightness(brightness:Single):Void

@:native("SetAdjustmentColorCorrection")setAdjustmentColorCorrection(colorCorrection:Texture):Void

@:native("SetAdjustmentContrast")setAdjustmentContrast(contrast:Single):Void

@:native("SetAdjustmentEnable")setAdjustmentEnable(enabled:Bool):Void

@:native("SetAdjustmentSaturation")setAdjustmentSaturation(saturation:Single):Void

@:native("SetAmbientLightColor")setAmbientLightColor(color:Color):Void

@:native("SetAmbientLightEnergy")setAmbientLightEnergy(energy:Single):Void

@:native("SetAmbientLightSkyContribution")setAmbientLightSkyContribution(energy:Single):Void

@:native("SetBackground")setBackground(mode:Environment_BGMode):Void

@:native("SetBgColor")setBgColor(color:Color):Void

@:native("SetBgEnergy")setBgEnergy(energy:Single):Void

@:native("SetCameraFeedId")setCameraFeedId(cameraFeedId:Int):Void

@:native("SetCanvasMaxLayer")setCanvasMaxLayer(layer:Int):Void

@:native("SetDofBlurFarAmount")setDofBlurFarAmount(intensity:Single):Void

@:native("SetDofBlurFarDistance")setDofBlurFarDistance(intensity:Single):Void

@:native("SetDofBlurFarEnabled")setDofBlurFarEnabled(enabled:Bool):Void

@:native("SetDofBlurFarQuality")setDofBlurFarQuality(intensity:Environment_DOFBlurQuality):Void

@:native("SetDofBlurFarTransition")setDofBlurFarTransition(intensity:Single):Void

@:native("SetDofBlurNearAmount")setDofBlurNearAmount(intensity:Single):Void

@:native("SetDofBlurNearDistance")setDofBlurNearDistance(intensity:Single):Void

@:native("SetDofBlurNearEnabled")setDofBlurNearEnabled(enabled:Bool):Void

@:native("SetDofBlurNearQuality")setDofBlurNearQuality(level:Environment_DOFBlurQuality):Void

@:native("SetDofBlurNearTransition")setDofBlurNearTransition(intensity:Single):Void

@:native("SetFogColor")setFogColor(color:Color):Void

@:native("SetFogDepthBegin")setFogDepthBegin(distance:Single):Void

@:native("SetFogDepthCurve")setFogDepthCurve(curve:Single):Void

@:native("SetFogDepthEnabled")setFogDepthEnabled(enabled:Bool):Void

@:native("SetFogDepthEnd")setFogDepthEnd(distance:Single):Void

@:native("SetFogEnabled")setFogEnabled(enabled:Bool):Void

@:native("SetFogHeightCurve")setFogHeightCurve(curve:Single):Void

@:native("SetFogHeightEnabled")setFogHeightEnabled(enabled:Bool):Void

@:native("SetFogHeightMax")setFogHeightMax(height:Single):Void

@:native("SetFogHeightMin")setFogHeightMin(height:Single):Void

@:native("SetFogSunAmount")setFogSunAmount(amount:Single):Void

@:native("SetFogSunColor")setFogSunColor(color:Color):Void

@:native("SetFogTransmitCurve")setFogTransmitCurve(curve:Single):Void

@:native("SetFogTransmitEnabled")setFogTransmitEnabled(enabled:Bool):Void

@:native("SetGlowBicubicUpscale")setGlowBicubicUpscale(enabled:Bool):Void

@:native("SetGlowBlendMode")setGlowBlendMode(mode:Environment_GlowBlendModeEnum):Void

@:native("SetGlowBloom")setGlowBloom(amount:Single):Void

@:native("SetGlowEnabled")setGlowEnabled(enabled:Bool):Void

@:native("SetGlowHdrBleedScale")setGlowHdrBleedScale(scale:Single):Void

@:native("SetGlowHdrBleedThreshold")setGlowHdrBleedThreshold(threshold:Single):Void

@:native("SetGlowHdrLuminanceCap")setGlowHdrLuminanceCap(amount:Single):Void

@:native("SetGlowHighQuality")setGlowHighQuality(enabled:Bool):Void

@:native("SetGlowIntensity")setGlowIntensity(intensity:Single):Void

@:native("SetGlowLevel")setGlowLevel(idx:Int, enabled:Bool):Void

Enables or disables the glow level at index idx. Each level relies on the previous level. This means that enabling higher glow levels will slow down the glow effect rendering, even if previous levels aren't enabled.

@:native("SetGlowStrength")setGlowStrength(strength:Single):Void

@:native("SetSky")setSky(sky:Sky):Void

@:native("SetSkyCustomFov")setSkyCustomFov(scale:Single):Void

@:native("SetSkyOrientation")setSkyOrientation(orientation:Basis):Void

@:native("SetSkyRotation")setSkyRotation(eulerRadians:Vector3):Void

@:native("SetSkyRotationDegrees")setSkyRotationDegrees(eulerDegrees:Vector3):Void

@:native("SetSsaoAoChannelAffect")setSsaoAoChannelAffect(amount:Single):Void

@:native("SetSsaoBias")setSsaoBias(bias:Single):Void

@:native("SetSsaoBlur")setSsaoBlur(mode:Environment_SSAOBlur):Void

@:native("SetSsaoColor")setSsaoColor(color:Color):Void

@:native("SetSsaoDirectLightAffect")setSsaoDirectLightAffect(amount:Single):Void

@:native("SetSsaoEdgeSharpness")setSsaoEdgeSharpness(edgeSharpness:Single):Void

@:native("SetSsaoEnabled")setSsaoEnabled(enabled:Bool):Void

@:native("SetSsaoIntensity")setSsaoIntensity(intensity:Single):Void

@:native("SetSsaoIntensity2")setSsaoIntensity2(intensity:Single):Void

@:native("SetSsaoQuality")setSsaoQuality(quality:Environment_SSAOQuality):Void

@:native("SetSsaoRadius")setSsaoRadius(radius:Single):Void

@:native("SetSsaoRadius2")setSsaoRadius2(radius:Single):Void

@:native("SetSsrDepthTolerance")setSsrDepthTolerance(depthTolerance:Single):Void

@:native("SetSsrEnabled")setSsrEnabled(enabled:Bool):Void

@:native("SetSsrFadeIn")setSsrFadeIn(fadeIn:Single):Void

@:native("SetSsrFadeOut")setSsrFadeOut(fadeOut:Single):Void

@:native("SetSsrMaxSteps")setSsrMaxSteps(maxSteps:Int):Void

@:native("SetSsrRough")setSsrRough(rough:Bool):Void

@:native("SetTonemapAutoExposure")setTonemapAutoExposure(autoExposure:Bool):Void

@:native("SetTonemapAutoExposureGrey")setTonemapAutoExposureGrey(exposureGrey:Single):Void

@:native("SetTonemapAutoExposureMax")setTonemapAutoExposureMax(exposureMax:Single):Void

@:native("SetTonemapAutoExposureMin")setTonemapAutoExposureMin(exposureMin:Single):Void

@:native("SetTonemapAutoExposureSpeed")setTonemapAutoExposureSpeed(exposureSpeed:Single):Void

@:native("SetTonemapExposure")setTonemapExposure(exposure:Single):Void

@:native("SetTonemapWhite")setTonemapWhite(white:Single):Void

@:native("SetTonemapper")setTonemapper(mode:Environment_ToneMapper):Void

Inherited Variables

Defined by Resource

read onlyonChanged:Signal<() ‑> Void>

changed signal.

@:native("ResourceLocalToScene")resourceLocalToScene:Bool

If true, the resource will be made unique in each instance of its local scene. It can thus be modified in a scene instance without impacting other instances of that same scene.

@:native("ResourceName")resourceName:String

The name of the resource. This is an optional identifier. If godot.Resource.resourceName is not empty, its value will be displayed to represent the current resource in the editor inspector. For built-in scripts, the godot.Resource.resourceName will be displayed as the tab name in the script editor.

@:native("ResourcePath")resourcePath:String

The path to the resource. In case it has its own file, it will return its filepath. If it's tied to the scene, it will return the scene's path, followed by the resource's index.

Defined by Object

@:native("DynamicObject")read onlydynamicObject:Dynamic

Gets a new godot.DynamicGodotObject associated with this instance.

@:native("NativeInstance")read onlynativeInstance:IntPtr

The pointer to the native instance of this godot.Object.

read onlyonScriptChanged:Signal<() ‑> Void>

script_changed signal.

Inherited Methods

Defined by Resource

@:native("_SetupLocalToScene")_SetupLocalToScene():Void

Virtual function which can be overridden to customize the behavior value of godot.Resource.setupLocalToScene.

@:native("Duplicate")duplicate(?subresources:Bool):Resource

Duplicates the resource, returning a new resource with the exported members copied. Note: To duplicate the resource the constructor is called without arguments. This method will error when the constructor doesn't have default values.

By default, sub-resources are shared between resource copies for efficiency. This can be changed by passing true to the subresources argument which will copy the subresources.

Note: If subresources is true, this method will only perform a shallow copy. Nested resources within subresources will not be duplicated and will still be shared.

Note: When duplicating a resource, only exported properties are copied. Other properties will be set to their default value in the new resource.

@:native("EmitChanged")emitChanged():Void

Emits the changed signal.

If external objects which depend on this resource should be updated, this method must be called manually whenever the state of this resource has changed (such as modification of properties).

The method is equivalent to:


emit_signal("changed")

Note: This method is called automatically for built-in resources.

@:native("GetLocalScene")getLocalScene():Node

If godot.Resource.resourceLocalToScene is enabled and the resource was loaded from a godot.PackedScene instantiation, returns the local scene where this resource's unique copy is in use. Otherwise, returns null.

@:native("GetName")getName():String

@:native("GetPath")getPath():String

@:native("GetRid")getRid():RID

Returns the RID of the resource (or an empty RID). Many resources (such as godot.Texture, godot.Mesh, etc) are high-level abstractions of resources stored in a server, so this function will return the original RID.

@:native("IsLocalToScene")isLocalToScene():Bool

@:native("SetLocalToScene")setLocalToScene(enable:Bool):Void

@:native("SetName")setName(name:String):Void

@:native("SetPath")setPath(path:String):Void

@:native("SetupLocalToScene")setupLocalToScene():Void

This method is called when a resource with godot.Resource.resourceLocalToScene enabled is loaded from a godot.PackedScene instantiation. Its behavior can be customized by overriding godot.Resource._SetupLocalToScene from script.

For most resources, this method performs no base logic. godot.ViewportTexture performs custom logic to properly set the proxy texture and flags in the local viewport.

@:native("TakeOverPath")takeOverPath(path:String):Void

Sets the path of the resource, potentially overriding an existing cache entry for this path. This differs from setting godot.Resource.resourcePath, as the latter would error out if another resource was already cached for the given path.

Defined by Reference

@:native("InitRef")initRef():Bool

Initializes the internal reference counter. Use this only if you really know what you are doing.

Returns whether the initialization was successful.

@:native("Reference_")reference_():Bool

Increments the internal reference counter. Use this only if you really know what you are doing.

Returns true if the increment was successful, false otherwise.

@:native("Unreference")unreference():Bool

Decrements the internal reference counter. Use this only if you really know what you are doing.

Returns true if the decrement was successful, false otherwise.

Defined by Object

@:native("_Get")_Get(property:String):Dynamic

Virtual method which can be overridden to customize the return value of godot.Object.get.

Returns the given property. Returns null if the property does not exist.

@:native("_GetPropertyList")_GetPropertyList():Array

Virtual method which can be overridden to customize the return value of godot.Object.getPropertyList.

Returns the object's property list as an godot.Collections_Array of dictionaries.

Each property's godot.Collections_Dictionary must contain at least name: String and type: int (see godot.Variant_Type) entries. Optionally, it can also include hint: int (see godot.PropertyHint), hint_string: String, and usage: int (see godot.PropertyUsageFlags).

@:native("_Notification")_Notification(what:Int):Void

Called whenever the object receives a notification, which is identified in what by a constant. The base godot.Object has two constants godot.Object.notificationPostinitialize and godot.Object.notificationPredelete, but subclasses such as godot.Node define a lot more notifications which are also received by this method.

@:native("_Set")_Set(property:String, value:Dynamic):Bool

Virtual method which can be overridden to customize the return value of godot.Object.set.

Sets a property. Returns true if the property exists.

@:native("AddUserSignal")addUserSignal(signal:String, ?arguments:Array):Void

Adds a user-defined signal. Arguments are optional, but can be added as an godot.Collections_Array of dictionaries, each containing name: String and type: int (see godot.Variant_Type) entries.

Parameters:

arguments

If the parameter is null, then the default value is new Godot.Collections.Array { }

@:native("Call")call(method:String, args:HaxeArray<Dynamic>):Dynamic

Calls the method on the object and returns the result. This method supports a variable number of arguments, so parameters are passed as a comma separated list. Example:


call("set", "position", Vector2(42.0, 0.0))

Note: In C#, the method name must be specified as snake_case if it is defined by a built-in Godot node. This doesn't apply to user-defined methods where you should use the same convention as in the C# source (typically PascalCase).

@:native("CallDeferred")callDeferred(method:String, args:HaxeArray<Dynamic>):Void

Calls the method on the object during idle time. This method supports a variable number of arguments, so parameters are passed as a comma separated list. Example:


call_deferred("set", "position", Vector2(42.0, 0.0))

Note: In C#, the method name must be specified as snake_case if it is defined by a built-in Godot node. This doesn't apply to user-defined methods where you should use the same convention as in the C# source (typically PascalCase).

@:native("Callv")callv(method:String, argArray:Array):Dynamic

Calls the method on the object and returns the result. Contrarily to godot.Object.call, this method does not support a variable number of arguments but expects all parameters to be via a single godot.Collections_Array.


callv("set", [ "position", Vector2(42.0, 0.0) ])

@:native("CanTranslateMessages")canTranslateMessages():Bool

Returns true if the object can translate strings. See godot.Object.setMessageTranslation and godot.Object.tr.

@:native("Connect")connect(signal:String, target:Object, method:String, ?binds:Array, ?flags:UInt):Error

Connects a signal to a method on a target object. Pass optional binds to the call as an godot.Collections_Array of parameters. These parameters will be passed to the method after any parameter used in the call to godot.Object.emitSignal. Use flags to set deferred or one-shot connections. See godot.Object_ConnectFlags constants.

A signal can only be connected once to a method. It will print an error if already connected, unless the signal was connected with godot.Object_ConnectFlags.referenceCounted. To avoid this, first, use godot.Object.isConnected to check for existing connections.

If the target is destroyed in the game's lifecycle, the connection will be lost.

Examples:


connect("pressed", self, "_on_Button_pressed") # BaseButton signal
connect("text_entered", self, "_on_LineEdit_text_entered") # LineEdit signal
connect("hit", self, "_on_Player_hit", [ weapon_type, damage ]) # User-defined signal

An example of the relationship between binds passed to godot.Object.connect and parameters used when calling godot.Object.emitSignal:


connect("hit", self, "_on_Player_hit", [ weapon_type, damage ]) # weapon_type and damage are passed last
emit_signal("hit", "Dark lord", 5) # "Dark lord" and 5 are passed first
func _on_Player_hit(hit_by, level, weapon_type, damage):
print("Hit by %s (lvl %d) with weapon %s for %d damage" % [hit_by, level, weapon_type, damage])

Parameters:

binds

If the parameter is null, then the default value is new Godot.Collections.Array { }

@:native("Disconnect")disconnect(signal:String, target:Object, method:String):Void

Disconnects a signal from a method on the given target.

If you try to disconnect a connection that does not exist, the method will print an error. Use godot.Object.isConnected to ensure that the connection exists.

@:native("Dispose")dispose():Void

@:native("Dispose")@:protectedDispose(disposing:Bool):Void

Disposes of this godot.Object.

@:native("EmitSignal")emitSignal(signal:String, args:HaxeArray<Dynamic>):Void

Emits the given signal. The signal must exist, so it should be a built-in signal of this class or one of its parent classes, or a user-defined signal. This method supports a variable number of arguments, so parameters are passed as a comma separated list. Example:


emit_signal("hit", weapon_type, damage)
emit_signal("game_over")

@:native("Free")free():Void

Deletes the object from memory immediately. For godot.Nodes, you may want to use godot.Node.queueFree to queue the node for safe deletion at the end of the current frame.

Important: If you have a variable pointing to an object, it will not be assigned to null once the object is freed. Instead, it will point to a previously freed instance and you should validate it with @GDScript.is_instance_valid before attempting to call its methods or access its properties.

@:native("Get")get(property:String):Dynamic

Returns the Variant value of the given property. If the property doesn't exist, this will return null.

Note: In C#, the property name must be specified as snake_case if it is defined by a built-in Godot node. This doesn't apply to user-defined properties where you should use the same convention as in the C# source (typically PascalCase).

@:native("GetClass")getClass():String

Returns the object's class as a String. See also godot.Object.isClass.

Note: godot.Object.getClass does not take class_name declarations into account. If the object has a class_name defined, the base class name will be returned instead.

@:native("GetIncomingConnections")getIncomingConnections():Array

Returns an godot.Collections_Array of dictionaries with information about signals that are connected to the object.

Each godot.Collections_Dictionary contains three String entries:

  • source is a reference to the signal emitter.

  • signal_name is the name of the connected signal.

  • method_name is the name of the method to which the signal is connected.

@:native("GetIndexed")getIndexed(property:NodePath):Dynamic

Gets the object's property indexed by the given godot.NodePath. The node path should be relative to the current object and can use the colon character (:) to access nested properties. Examples: "position:x" or "material:next_pass:blend_mode".

Note: Even though the method takes godot.NodePath argument, it doesn't support actual paths to godot.Nodes in the scene tree, only colon-separated sub-property paths. For the purpose of nodes, use godot.Node.getNodeAndResource instead.

@:native("GetInstanceId")getInstanceId():UInt64

Returns the object's unique instance ID.

This ID can be saved in godot.EncodedObjectAsID, and can be used to retrieve the object instance with @GDScript.instance_from_id.

@:native("GetMeta")getMeta(name:String):Dynamic

Returns the object's metadata entry for the given name.

inlinegetMetaList():Array<String>

Returns the object's metadata as a String.

@:native("GetMethodList")getMethodList():Array

Returns the object's methods and their signatures as an godot.Collections_Array.

@:native("GetPropertyList")getPropertyList():Array

Returns the object's property list as an godot.Collections_Array of dictionaries.

Each property's godot.Collections_Dictionary contain at least name: String and type: int (see godot.Variant_Type) entries. Optionally, it can also include hint: int (see godot.PropertyHint), hint_string: String, and usage: int (see godot.PropertyUsageFlags).

@:native("GetScript")getScript():Reference

Returns the object's godot.Script instance, or null if none is assigned.

@:native("GetSignalConnectionList")getSignalConnectionList(signal:String):Array

Returns an godot.Collections_Array of connections for the given signal.

@:native("GetSignalList")getSignalList():Array

Returns the list of signals as an godot.Collections_Array of dictionaries.

@:native("HasMeta")hasMeta(name:String):Bool

Returns true if a metadata entry is found with the given name.

@:native("HasMethod")hasMethod(method:String):Bool

Returns true if the object contains the given method.

@:native("HasSignal")hasSignal(signal:String):Bool

Returns true if the given signal exists.

@:native("HasUserSignal")hasUserSignal(signal:String):Bool

Returns true if the given user-defined signal exists. Only signals added using godot.Object.addUserSignal are taken into account.

@:native("IsBlockingSignals")isBlockingSignals():Bool

Returns true if signal emission blocking is enabled.

@:native("IsClass")isClass(class_:String):Bool

Returns true if the object inherits from the given class. See also godot.Object.getClass.

Note: godot.Object.isClass does not take class_name declarations into account. If the object has a class_name defined, godot.Object.isClass will return false for that name.

@:native("IsConnected")isConnected(signal:String, target:Object, method:String):Bool

Returns true if a connection exists for a given signal, target, and method.

@:native("IsQueuedForDeletion")isQueuedForDeletion():Bool

Returns true if the godot.Node.queueFree method was called for the object.

@:native("Notification")notification(what:Int, ?reversed:Bool):Void

Send a given notification to the object, which will also trigger a call to the godot.Object._Notification method of all classes that the object inherits from.

If reversed is true, godot.Object._Notification is called first on the object's own class, and then up to its successive parent classes. If reversed is false, godot.Object._Notification is called first on the highest ancestor (godot.Object itself), and then down to its successive inheriting classes.

@:native("PropertyListChangedNotify")propertyListChangedNotify():Void

Notify the editor that the property list has changed, so that editor plugins can take the new values into account. Does nothing on export builds.

@:native("RemoveMeta")removeMeta(name:String):Void

Removes a given entry from the object's metadata. See also godot.Object.setMeta.

@:native("Set")set(property:String, value:Dynamic):Void

Assigns a new value to the given property. If the property does not exist or the given value's type doesn't match, nothing will happen.

Note: In C#, the property name must be specified as snake_case if it is defined by a built-in Godot node. This doesn't apply to user-defined properties where you should use the same convention as in the C# source (typically PascalCase).

@:native("SetBlockSignals")setBlockSignals(enable:Bool):Void

If set to true, signal emission is blocked.

@:native("SetDeferred")setDeferred(property:String, value:Dynamic):Void

Assigns a new value to the given property, after the current frame's physics step. This is equivalent to calling godot.Object.set via godot.Object.callDeferred, i.e. call_deferred("set", property, value).

Note: In C#, the property name must be specified as snake_case if it is defined by a built-in Godot node. This doesn't apply to user-defined properties where you should use the same convention as in the C# source (typically PascalCase).

@:native("SetIndexed")setIndexed(property:NodePath, value:Dynamic):Void

Assigns a new value to the property identified by the godot.NodePath. The node path should be relative to the current object and can use the colon character (:) to access nested properties. Example:


set_indexed("position", Vector2(42, 0))
set_indexed("position:y", -10)
print(position) # (42, -10)

@:native("SetMessageTranslation")setMessageTranslation(enable:Bool):Void

Defines whether the object can translate strings (with calls to godot.Object.tr). Enabled by default.

@:native("SetMeta")setMeta(name:String, value:Dynamic):Void

Adds, changes or removes a given entry in the object's metadata. Metadata are serialized and can take any Variant value.

To remove a given entry from the object's metadata, use godot.Object.removeMeta. Metadata is also removed if its value is set to null. This means you can also use set_meta("name", null) to remove metadata for "name".

@:native("SetScript")setScript(script:Reference):Void

Assigns a script to the object. Each object can have a single script assigned to it, which are used to extend its functionality.

If the object already had a script, the previous script instance will be freed and its variables and state will be lost. The new script's method will be called.

@:native("ToSignal")toSignal(source:Object, signal:String):SignalAwaiter

Returns a new godot.SignalAwaiter awaiter configured to complete when the instance source emits the signal specified by the signal parameter.

Parameters:

source

The instance the awaiter will be listening to.

signal

The signal the awaiter will be waiting for. This sample prints a message once every frame up to 100 times.

public override void _Ready()
{
for (int i = 0; i &lt; 100; i++)
{
await ToSignal(GetTree(), "idle_frame");
GD.Print($"Frame {i}");
}
}

Returns:

A godot.SignalAwaiter that completes when source emits the signal.

@:native("ToString")toString():String

Converts this godot.Object to a string.

Returns:

A string representation of this object.

@:native("Tr")tr(message:String):String

Translates a message using translation catalogs configured in the Project Settings.

Only works if message translation is enabled (which it is by default), otherwise it returns the message unchanged. See godot.Object.setMessageTranslation.