Inheritance #
- AudioServer
- CameraServer
- ClassDB
- DisplayServer
- EditorFileSystemDirectory
- EditorInterface
- EditorPaths
- EditorSelection
- EditorUndoRedoManager
- EditorVCSInterface
- Engine
- EngineDebugger
- FramebufferCacheRD
- GDExtensionManager
- Geometry2D
- Geometry3D
- IP
- Input
- InputMap
- JNISingleton
- JSONRPC
- JavaClassWrapper
- JavaScriptBridge
- MainLoop (1)
- Marshalls
- MovieWriter
- NativeMenu
- NavigationMeshGenerator
- NavigationServer2D
- NavigationServer3D
- Node (21)
- OS
- OpenXRExtensionWrapperExtension
- OpenXRInteractionProfileMetadata
- Performance
- PhysicsDirectBodyState2D (1)
- PhysicsDirectBodyState3D (1)
- PhysicsDirectSpaceState2D (1)
- PhysicsDirectSpaceState3D (1)
- PhysicsServer2D (1)
- PhysicsServer2DManager
- PhysicsServer3D (1)
- PhysicsServer3DManager
- PhysicsServer3DRendering
ServerHandler
- ProjectSettings
- RefCounted (121)
- RenderData (2)
- RenderSceneData (2)
- RenderingDevice
- RenderingServer
- ResourceLoader
- ResourceSaver
- ResourceUID
- ScriptLanguage (1)
- ShaderIncludeDB
- TextServerManager
- ThemeDB
- TileData
- Time
- TranslationServer
- TreeItem
- UndoRedo
- UniformSetCacheRD
- WorkerThreadPool
- XRServer
- XRVRS
- AnimationMixer (2)
- AudioStreamPlayer
- CanvasItem (2)
- CanvasLayer (1)
- EditorFileSystem
- EditorPlugin (1)
- EditorResourcePreview
- HTTPRequest
- InstancePlaceholder
- MissingNode
- MultiplayerSpawner
- MultiplayerSynchronizer
- NavigationAgent2D
- NavigationAgent3D
- Node3D (31)
- ResourcePreloader
- ShaderGlobalsOverride
- StatusIndicator
- Timer
- Viewport (2)
- WorldEnvironment
- AnimatedSprite2D
- AudioListener2D
- AudioStreamPlayer2D
- BackBufferCopy
- Bone2D
- CPUParticles2D
- Camera2D
- CanvasGroup
- CanvasModulate
- CollisionObject2D (2)
- CollisionPolygon2D
- CollisionShape2D
- GPUParticles2D
- Joint2D (3)
- Light2D (2)
- LightOccluder2D
- Line2D
- Marker2D
- MeshInstance2D
- MultiMeshInstance2D
- NavigationLink2D
- NavigationObstacle2D
- NavigationRegion2D
- Parallax2D
- ParallaxLayer
- Path2D
- PathFollow2D
- Polygon2D
- RayCast2D
- RemoteTransform2D
- ShapeCast2D
- Skeleton2D
- Sprite2D
- TileMap
- TileMapLayer
- TouchScreenButton
- VisibleOnScreenNotifier2D (1)
Table of contents
VisibleOnScreenNotifier2D #
is_instantiable, Node2D, Node, core, not_builtin_classes
A rectangular region of 2D space that detects whether it is visible on screen.
VisibleOnScreenNotifier2D represents a rectangular region of 2D space. When any part of this region becomes visible on screen or in a viewport, it will emit a screen_entered signal, and likewise it will emit a screen_exited signal when no part of it remains visible.
If you want a node to be enabled automatically when this region is visible on screen, use VisibleOnScreenEnabler2D.
Note: VisibleOnScreenNotifier2D uses the render culling code to determine whether it's visible on screen, so it won't function unless CanvasItem.visible is set to true.
Members #
var rect: Rect2 = Rect2(-10, -10, 20, 20)#
The VisibleOnScreenNotifier2D's bounding rectangle.
Methods #
const func is_on_screen() -> bool#
If true, the bounding rectangle is on the screen.
Note: It takes one frame for the VisibleOnScreenNotifier2D's visibility to be determined once added to the scene tree, so this method will always return false right after it is instantiated, before the draw pass.
Annotations #
Constants #
Constructors #
Enums #
Operators #
Signals #
signal screen_entered()#
Emitted when the VisibleOnScreenNotifier2D enters the screen.
signal screen_exited()#
Emitted when the VisibleOnScreenNotifier2D exits the screen.