diff options
Diffstat (limited to 'scene/main/scene_tree.cpp')
| -rw-r--r-- | scene/main/scene_tree.cpp | 8 | 
1 files changed, 7 insertions, 1 deletions
diff --git a/scene/main/scene_tree.cpp b/scene/main/scene_tree.cpp index 9aaddfd373..3e08f86fc9 100644 --- a/scene/main/scene_tree.cpp +++ b/scene/main/scene_tree.cpp @@ -389,6 +389,7 @@ void SceneTree::set_group(const StringName &p_group, const String &p_name, const  }  void SceneTree::initialize() { +	ERR_FAIL_COND(!root);  	initialized = true;  	root->_set_tree(this);  	MainLoop::initialize(); @@ -1266,7 +1267,7 @@ void SceneTree::_bind_methods() {  	ADD_PROPERTY(PropertyInfo(Variant::BOOL, "multiplayer_poll"), "set_multiplayer_poll_enabled", "is_multiplayer_poll_enabled");  	ADD_SIGNAL(MethodInfo("tree_changed")); -	ADD_SIGNAL(MethodInfo("tree_process_mode_changed")); //editor only signal, but due to API hash it cant be removed in run-time +	ADD_SIGNAL(MethodInfo("tree_process_mode_changed")); //editor only signal, but due to API hash it can't be removed in run-time  	ADD_SIGNAL(MethodInfo("node_added", PropertyInfo(Variant::OBJECT, "node", PROPERTY_HINT_RESOURCE_TYPE, "Node")));  	ADD_SIGNAL(MethodInfo("node_removed", PropertyInfo(Variant::OBJECT, "node", PROPERTY_HINT_RESOURCE_TYPE, "Node")));  	ADD_SIGNAL(MethodInfo("node_renamed", PropertyInfo(Variant::OBJECT, "node", PROPERTY_HINT_RESOURCE_TYPE, "Node"))); @@ -1348,6 +1349,8 @@ SceneTree::SceneTree() {  	GLOBAL_DEF("debug/shapes/collision/draw_2d_outlines", true); +	Math::randomize(); +  	// Create with mainloop.  	root = memnew(Window); @@ -1375,6 +1378,9 @@ SceneTree::SceneTree() {  	const bool use_debanding = GLOBAL_DEF("rendering/anti_aliasing/quality/use_debanding", false);  	root->set_use_debanding(use_debanding); +	const bool use_occlusion_culling = GLOBAL_DEF("rendering/occlusion_culling/use_occlusion_culling", false); +	root->set_use_occlusion_culling(use_occlusion_culling); +  	float lod_threshold = GLOBAL_DEF("rendering/mesh_lod/lod_change/threshold_pixels", 1.0);  	ProjectSettings::get_singleton()->set_custom_property_info("rendering/mesh_lod/lod_change/threshold_pixels", PropertyInfo(Variant::FLOAT, "rendering/mesh_lod/lod_change/threshold_pixels", PROPERTY_HINT_RANGE, "0,1024,0.1"));  	root->set_lod_threshold(lod_threshold);  |