From 3fc1f7dfbeb038ca7db8da637b67282c800b492e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Mon, 15 Apr 2019 17:10:33 +0200 Subject: [PATCH] doc: Add note about VisibilityNotifier.is_on_screen after instantiation Fixes #9430. --- doc/classes/VisibilityNotifier.xml | 1 + doc/classes/VisibilityNotifier2D.xml | 1 + 2 files changed, 2 insertions(+) diff --git a/doc/classes/VisibilityNotifier.xml b/doc/classes/VisibilityNotifier.xml index e30078d82fb..062371ba295 100644 --- a/doc/classes/VisibilityNotifier.xml +++ b/doc/classes/VisibilityNotifier.xml @@ -16,6 +16,7 @@ If [code]true[/code], the bounding box is on the screen. + Note: It takes one frame for the node's visibility to be assessed once added to the scene tree, so this method will return [code]false[/code] right after it is instantiated, even if it will be on screen in the draw pass. diff --git a/doc/classes/VisibilityNotifier2D.xml b/doc/classes/VisibilityNotifier2D.xml index 5689ced4bf9..7b553c75186 100644 --- a/doc/classes/VisibilityNotifier2D.xml +++ b/doc/classes/VisibilityNotifier2D.xml @@ -16,6 +16,7 @@ If [code]true[/code], the bounding rectangle is on the screen. + Note: It takes one frame for the node's visibility to be assessed once added to the scene tree, so this method will return [code]false[/code] right after it is instantiated, even if it will be on screen in the draw pass.