mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Compile out editor-only logic within validate_property in games
This commit is contained in:
parent
d9cd011e2f
commit
8ba4656ea3
69 changed files with 274 additions and 119 deletions
|
|
@ -1082,6 +1082,9 @@ void Environment::_update_adjustment() {
|
|||
// Private methods, constructor and destructor
|
||||
|
||||
void Environment::_validate_property(PropertyInfo &p_property) const {
|
||||
if (!Engine::get_singleton()->is_editor_hint()) {
|
||||
return;
|
||||
}
|
||||
if (p_property.name == "sky" || p_property.name == "sky_custom_fov" || p_property.name == "sky_rotation" || p_property.name == "ambient_light_sky_contribution") {
|
||||
if (bg_mode != BG_SKY && ambient_source != AMBIENT_SOURCE_SKY && reflection_source != REFLECTION_SOURCE_SKY) {
|
||||
p_property.usage = PROPERTY_USAGE_NO_EDITOR;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue