- } else if (ResourceLoader::exists(p_class)) { // If the script is not a class_name we check if the script resource exists.
+ } else if (!p_class.get_extension().is_empty() && ResourceLoader::exists(p_class)) { // If the script is not a class_name we check if the script resource exists.