diff options
author | J08nY <johny@neuromancer.sk> | 2016-10-03 16:23:43 +0200 |
---|---|---|
committer | J08nY <johny@neuromancer.sk> | 2016-10-03 16:23:43 +0200 |
commit | af35130b50c3238e82aa3b43fbc983fd7e4daf50 (patch) | |
tree | 682f3966394ce510582aa5bcb6c2d866b4176653 /scene/3d | |
parent | 3ecd8560fd90a615d80a447b04e713bb2c600fe4 (diff) |
light: respect editor_only setting in release build and dont show the light
Diffstat (limited to 'scene/3d')
-rw-r--r-- | scene/3d/light.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/scene/3d/light.cpp b/scene/3d/light.cpp index 227bb3a59d..5b221d1574 100644 --- a/scene/3d/light.cpp +++ b/scene/3d/light.cpp @@ -446,6 +446,10 @@ bool editor_ok=true; editor_ok = (get_tree()->get_edited_scene_root() && (this==get_tree()->get_edited_scene_root() || get_owner()==get_tree()->get_edited_scene_root())); } } +#else + if (editor_only) { + editor_ok=false; + } #endif VS::get_singleton()->instance_light_set_enabled(get_instance(),is_visible() && enabled && editor_ok); @@ -672,5 +676,3 @@ void SpotLight::_bind_methods() { ADD_PROPERTYI( PropertyInfo( Variant::REAL, "params/spot_attenuation", PROPERTY_HINT_EXP_EASING, "spot_attenuation"), _SCS("set_parameter"), _SCS("get_parameter"), PARAM_SPOT_ATTENUATION ); } - - |