diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml index 25f8f22d440..95108f16137 100644 --- a/doc/classes/@GlobalScope.xml +++ b/doc/classes/@GlobalScope.xml @@ -804,10 +804,7 @@ Randomizes the seed (or the internal state) of the random number generator. Current implementation reseeds using a number based on time. - [codeblock] - func _ready(): - randomize() - [/codeblock] + [b]Note:[/b] This method is called automatically when the project is run. If you need to fix the seed to have reproducible results, use [method seed] to initialize the random number generator. diff --git a/scene/main/scene_tree.cpp b/scene/main/scene_tree.cpp index 66f3a2ebde6..a62c4ff770a 100644 --- a/scene/main/scene_tree.cpp +++ b/scene/main/scene_tree.cpp @@ -1349,6 +1349,8 @@ SceneTree::SceneTree() { GLOBAL_DEF("debug/shapes/collision/draw_2d_outlines", true); + Math::randomize(); + // Create with mainloop. root = memnew(Window);