diff --git a/code/glTF2AssetWriter.inl b/code/glTF2AssetWriter.inl index 001fa0f01..fa406fc71 100644 --- a/code/glTF2AssetWriter.inl +++ b/code/glTF2AssetWriter.inl @@ -156,7 +156,10 @@ namespace glTF2 { inline void Write(Value& obj, Buffer& b, AssetWriter& w) { obj.AddMember("byteLength", static_cast(b.byteLength), w.mAl); - obj.AddMember("uri", Value(b.GetURI(), w.mAl).Move(), w.mAl); + + const auto uri = b.GetURI(); + const auto relativeUri = uri.substr(uri.find_last_of("/\\") + 1u); + obj.AddMember("uri", Value(relativeUri, w.mAl).Move(), w.mAl); } inline void Write(Value& obj, BufferView& bv, AssetWriter& w)