(cherry picked from commit af35130b50c3238e82aa3b43fbc983fd7e4daf50)
@@ -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 );
-