diff options
| author | Juan Linietsky | 2017-08-20 12:55:46 -0300 |
|---|---|---|
| committer | GitHub | 2017-08-20 12:55:46 -0300 |
| commit | 541fdffc0ab2115238fe9cedbf1c088b15f11fdf (patch) | |
| tree | 187c5d0278e5075907fef8a86b4d00d6a0b7161a /scene/2d/light_2d.cpp | |
| parent | 831e21e89ba0275b43b6a351e538256b8ce715a3 (diff) | |
| parent | 90b8a5b71ef79e0339826507c4b290f0c51b7cd2 (diff) | |
| download | godot-541fdffc0ab2115238fe9cedbf1c088b15f11fdf.tar.gz godot-541fdffc0ab2115238fe9cedbf1c088b15f11fdf.tar.zst godot-541fdffc0ab2115238fe9cedbf1c088b15f11fdf.zip | |
Merge pull request #10319 from neikeq/pr-engine-editor-hint
Adds Engine::is_editor_hint() method
Diffstat (limited to 'scene/2d/light_2d.cpp')
| -rw-r--r-- | scene/2d/light_2d.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/scene/2d/light_2d.cpp b/scene/2d/light_2d.cpp index ffe69fa93..2b11913dd 100644 --- a/scene/2d/light_2d.cpp +++ b/scene/2d/light_2d.cpp @@ -28,6 +28,8 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ #include "light_2d.h" + +#include "engine.h" #include "servers/visual_server.h" void Light2D::edit_set_pivot(const Point2 &p_pivot) { @@ -70,7 +72,7 @@ void Light2D::_update_light_visibility() { #ifdef TOOLS_ENABLED if (editor_only) { - if (!get_tree()->is_editor_hint()) { + if (!Engine::get_singleton()->is_editor_hint()) { editor_ok = false; } else { editor_ok = (get_tree()->get_edited_scene_root() && (this == get_tree()->get_edited_scene_root() || get_owner() == get_tree()->get_edited_scene_root())); |
