浏览代码

Merge pull request #23256 from JFonS/fix_17989

Fix editor only lights
Rémi Verschelde 6 年之前
父节点
当前提交
d42fd8fa79
共有 1 个文件被更改,包括 2 次插入7 次删除
  1. 2 7
      scene/3d/light.cpp

+ 2 - 7
scene/3d/light.cpp

@@ -163,11 +163,6 @@ void Light::_update_visibility() {
 	if (!is_inside_tree())
 		return;
 
-	// FIXME: Since the call to VS::instance_light_set_enabled was disabled below,
-	// the whole logic became pointless so editor_ok triggers unused variable warnings.
-	// Commenting out for now but this should be fixed/reimplemented so that editor_only
-	// works as expected (GH-17989).
-	/*
 	bool editor_ok = true;
 
 #ifdef TOOLS_ENABLED
@@ -184,8 +179,8 @@ void Light::_update_visibility() {
 	}
 #endif
 
-	//VS::get_singleton()->instance_light_set_enabled(get_instance(),is_visible_in_tree() && editor_ok);
-	*/
+	VS::get_singleton()->instance_set_visible(get_instance(), is_visible_in_tree() && editor_ok);
+
 	_change_notify("geometry/visible");
 }