From 67a72a27592ddf3f363f7af252a6a627993bc5bc 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. (cherry picked from commit 3fc1f7dfbeb038ca7db8da637b67282c800b492e) --- doc/classes/VisibilityNotifier.xml | 3 ++- doc/classes/VisibilityNotifier2D.xml | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/doc/classes/VisibilityNotifier.xml b/doc/classes/VisibilityNotifier.xml index c689017aff0..c5dfc5b51bc 100644 --- a/doc/classes/VisibilityNotifier.xml +++ b/doc/classes/VisibilityNotifier.xml @@ -15,7 +15,8 @@ - If [code]true[/code] the bounding box is on the screen. + 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 caf4aaa372f..7d941618bda 100644 --- a/doc/classes/VisibilityNotifier2D.xml +++ b/doc/classes/VisibilityNotifier2D.xml @@ -15,7 +15,8 @@ - If [code]true[/code] the bounding rectangle is on the screen. + 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.