Merge pull request #80694 from novalis/pick-random-null

Document `pick_random` for empty arrays
This commit is contained in:
Rémi Verschelde 2023-08-21 08:22:05 +02:00
commit 56dd0edf58
No known key found for this signature in database
GPG Key ID: C3336907360768E1

View File

@ -462,7 +462,7 @@
<method name="pick_random" qualifiers="const">
<return type="Variant" />
<description>
Returns a random value from the target array.
Returns a random value from the target array. Prints an error and returns [code]null[/code] if the array is empty.
[codeblocks]
[gdscript]
var array: Array[int] = [1, 2, 3, 4]