Fix completion for global constants in shaders

This commit is contained in:
Yuri Roubinsky 2022-01-13 19:49:43 +03:00
parent 2b4290609a
commit 4201af6649

View file

@ -9383,6 +9383,9 @@ Error ShaderLanguage::complete(const String &p_code, const ShaderCompileInfo &p_
}
}
for (const KeyValue<StringName, ShaderNode::Constant> &E : shader->constants) {
matches.insert(E.key, ScriptCodeCompletionOption::KIND_CONSTANT);
}
for (const KeyValue<StringName, ShaderNode::Varying> &E : shader->varyings) {
matches.insert(E.key, ScriptCodeCompletionOption::KIND_VARIABLE);
}