mirror of
https://github.com/godotengine/godot.git
synced 2024-11-25 13:43:15 +00:00
Merge pull request #80694 from novalis/pick-random-null
Document `pick_random` for empty arrays
This commit is contained in:
commit
56dd0edf58
@ -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…
Reference in New Issue
Block a user