I downloaded latest version of Urho from git and couldn’t import gltf/glb file with AssetImporter. It basically complains that file extension is not supported. I opened assimp code and this is gltf2.0 importer(this function check if given importer can read file):
bool glTF2Importer::CanRead(const std::string& pFile, IOSystem* pIOHandler, bool checkSig) const
{
const std::string &extension = GetExtension(pFile);
if (extension != "gltf" && extension != "glb")
return false;
if (checkSig && pIOHandler) {
glTF2::Asset asset(pIOHandler);
try {
asset.Load(pFile, extension == "glb");
std::string version = asset.asset.version;
return !version.empty() && version[0] == '2';
} catch (...) {
return false;
}
}
return false;
}
I guess it’s a bug, it doesn’t return true if extension match, i basically added
else {
return true;
}
after if (checkSig && pIOHandler) {
block and now it can import gltf(tho no material imported correctly, but i guess it’s always the case?)