Merge pull request #80694 from novalis/pick-random-null
Document `pick_random` for empty arrays
This commit is contained in:
commit
56dd0edf58
1 changed files with 1 additions and 1 deletions
|
|
@ -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]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue