Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,16 @@ private void parseFromNode(JSONNode node)
uid = node["uid"];
vertexCount = node["vertexCount"].AsInt;
faceCount = node["faceCount"].AsInt;
archiveSize = node["archives"]["gltf"]["size"].AsInt;

JSONArray archives = node["archives"].AsArray;
foreach (JSONNode archive in archives)
{
if ((string)archive["type"] == "gltf")
{
archiveSize = archive["size"].AsInt;
return;
}
}
}

private string richifyText(string text)
Expand Down Expand Up @@ -139,7 +148,7 @@ public class SketchfabBrowserManager
Dictionary<string, string> _categories;

// Search
private const string INITIAL_SEARCH = "type=models&downloadable=true&staffpicked=true&min_face_count=1&sort_by=-publishedAt";
private const string INITIAL_SEARCH = "type=models&downloadable=true&available_archive_type=gltf&staffpicked=true&min_face_count=1&sort_by=-publishedAt";
string _lastQuery;
string _prevCursorUrl = "";
string _nextCursorUrl = "";
Expand Down Expand Up @@ -336,7 +345,7 @@ public void search(string query, bool staffpicked, bool animated, string categor
if (endpoint != SEARCH_ENDPOINT.STORE_PURCHASES)
{
// Apply default filters
searchQuery = searchQuery + "type=models&downloadable=true";
searchQuery = searchQuery + "type=models&downloadable=true&available_archive_type=gltf";
}

if (query.Length > 0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace Sketchfab
{
public class SketchfabPlugin : MonoBehaviour
{
public static string VERSION = "1.2.1";
public static string VERSION = "1.2.2";

public struct Urls
{
Expand Down