Kaynağa Gözat

Merge pull request #28056 from akien-mga/doc-visibilitynotifier-ready

doc: Add note about VisibilityNotifier.is_on_screen after instantiation
Rémi Verschelde 6 yıl önce
ebeveyn
işleme
96123035da

+ 1 - 0
doc/classes/VisibilityNotifier.xml

@@ -16,6 +16,7 @@
 			</return>
 			<description>
 				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.
 			</description>
 		</method>
 	</methods>

+ 1 - 0
doc/classes/VisibilityNotifier2D.xml

@@ -16,6 +16,7 @@
 			</return>
 			<description>
 				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.
 			</description>
 		</method>
 	</methods>