Merge pull request #80730 from aaronfranke/xr-find-interface

Remove error print from `XRServer.find_interface`
This commit is contained in:
Rémi Verschelde 2023-08-18 00:42:48 +02:00
commit d7f0f391f0
No known key found for this signature in database
GPG Key ID: C3336907360768E1
1 changed files with 2 additions and 7 deletions

View File

@ -216,17 +216,12 @@ Ref<XRInterface> XRServer::get_interface(int p_index) const {
};
Ref<XRInterface> XRServer::find_interface(const String &p_name) const {
int idx = -1;
for (int i = 0; i < interfaces.size(); i++) {
if (interfaces[i]->get_name() == p_name) {
idx = i;
break;
return interfaces[i];
};
};
ERR_FAIL_COND_V_MSG(idx == -1, nullptr, "Interface not found.");
return interfaces[idx];
return Ref<XRInterface>();
};
TypedArray<Dictionary> XRServer::get_interfaces() const {