浏览代码

Merge pull request #3385 from godotengine/pr-fix-3384

Fix build with tools=no
Rémi Verschelde 9 年之前
父节点
当前提交
1584aea71e
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      scene/main/viewport.cpp

+ 4 - 0
scene/main/viewport.cpp

@@ -1279,9 +1279,11 @@ void Viewport::_vp_input(const InputEvent& p_ev) {
 	if (disable_input)
 		return;
 
+#ifdef TOOLS_ENABLED
 	if (get_tree()->is_editor_hint() && get_tree()->get_edited_scene_root()->is_a_parent_of(this)) {
 		return;
 	}
+#endif
 
 	if (parent_control && !parent_control->is_visible())
 		return;
@@ -1304,9 +1306,11 @@ void Viewport::_vp_unhandled_input(const InputEvent& p_ev) {
 	if (disable_input)
 		return;
 
+#ifdef TOOLS_ENABLED
 	if (get_tree()->is_editor_hint() && get_tree()->get_edited_scene_root()->is_a_parent_of(this)) {
 		return;
 	}
+#endif
 
 	if (parent_control && !parent_control->is_visible())
 		return;