light: respect editor_only setting in release build and dont show the light
This commit is contained in:
parent
3ecd8560fd
commit
af35130b50
|
@ -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 );
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue