diff options
Diffstat (limited to 'scene/main/shader_globals_override.cpp')
-rw-r--r-- | scene/main/shader_globals_override.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/scene/main/shader_globals_override.cpp b/scene/main/shader_globals_override.cpp index 726dcb58de..432fb5b4fb 100644 --- a/scene/main/shader_globals_override.cpp +++ b/scene/main/shader_globals_override.cpp @@ -202,7 +202,7 @@ void ShaderGlobalsOverride::_get_property_list(List<PropertyInfo> *p_list) const Override o; o.in_use = false; Callable::CallError ce; - o.override = Variant::construct(pinfo.type, nullptr, 0, ce); + Variant::construct(pinfo.type, o.override, nullptr, 0, ce); overrides[variables[i]] = o; } @@ -261,11 +261,16 @@ void ShaderGlobalsOverride::_notification(int p_what) { } String ShaderGlobalsOverride::get_configuration_warning() const { + String warning = Node::get_configuration_warning(); + if (!active) { - return TTR("ShaderGlobalsOverride is not active because another node of the same type is in the scene."); + if (!warning.empty()) { + warning += "\n\n"; + } + warning += TTR("ShaderGlobalsOverride is not active because another node of the same type is in the scene."); } - return String(); + return warning; } void ShaderGlobalsOverride::_bind_methods() { |