2
0
Fork 0

Prevent checking of global uniform type outside the editor

4.0
Yuri Roubinsky 2022-01-25 19:22:37 +07:00
parent 203e07aa39
commit b01065b9a4
1 changed files with 1 additions and 1 deletions

@ -7799,7 +7799,7 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct
}
if (uniform) {
if (uniform_scope == ShaderNode::Uniform::SCOPE_GLOBAL) {
if (uniform_scope == ShaderNode::Uniform::SCOPE_GLOBAL && Engine::get_singleton()->is_editor_hint()) { // Type checking for global uniforms is not allowed outside the editor.
//validate global uniform
DataType gvtype = global_var_get_type_func(name);
if (gvtype == TYPE_MAX) {