Export Your Assets
First, you need to export your assets from Unity Asset Store. Follow these steps:
- Go to Unity Asset Store - My Assets
- Make sure you're logged in
- Press F12 to open Chrome DevTools
- Go to the Console tab
- Copy the script below and paste it in the console
- Press Enter and wait for the download
(async function(){
const endpoint = "https://assetstore.unity.com/api/graphql/batch";
// Get CSRF token from cookies
const csrf = (() => {
for (let c of document.cookie.split(";")) {
let [n, v] = c.trim().split("=");
if (n === "_csrf") return decodeURIComponent(v);
}
return null;
})();
if (!csrf) {
console.error("CSRF token not found! Make sure you're logged in.");
return;
}
// GraphQL query
const query = `query SearchMyAssets($page: Int, $pageSize: Int, $q: [String],
$tagging: [String!], $assignFrom: [String!], $ids: [String!],
$sortBy: Int, $reverse: Boolean, $other: String) {
searchMyAssets(page: $page, pageSize: $pageSize, q: $q, tagging: $tagging,
assignFrom: $assignFrom, ids: $ids, sortBy: $sortBy, reverse: $reverse,
other: $other) {
results {
id orderId grantTime tagging assignFrom
product {
id productId itemId name
mainImage { icon75 icon __typename }
publisher { id name __typename }
publishNotes state
currentVersion { name publishedDate __typename }
downloadSize __typename
}
__typename
}
total __typename
}
}`;
// Fetch a page of assets
async function fetchPage(page) {
const response = await fetch(endpoint, {
method: "POST",
headers: {
"Content-Type": "application/json;charset=UTF-8",
"Accept": "application/json, text/plain, */*",
"x-csrf-token": csrf,
"x-requested-with": "XMLHttpRequest",
"x-source": "storefront",
"operations": "SearchMyAssets"
},
credentials: "include",
body: JSON.stringify([{
query: query,
variables: {
page: page,
pageSize: 100,
q: [],
tagging: [],
ids: [],
assignFrom: [],
sortBy: 7
},
operationName: "SearchMyAssets"
}])
});
return (await response.json())[0];
}
console.log("Fetching your assets...");
// Get first page to find total
let firstPage = await fetchPage(0);
let total = firstPage.data.searchMyAssets.total;
let pages = Math.ceil(total / 100);
let allAssets = [...firstPage.data.searchMyAssets.results];
// Fetch remaining pages
for (let p = 1; p < pages; p++) {
console.log("Page " + (p + 1) + "/" + pages);
let pageData = await fetchPage(p);
allAssets.push(...pageData.data.searchMyAssets.results);
await new Promise(r => setTimeout(r, 300)); // Rate limit
}
// Create download
let exportData = [{
data: { searchMyAssets: { count: total, results: allAssets } }
}];
let blob = new Blob([JSON.stringify(exportData, null, 2)], {
type: "application/json"
});
let a = document.createElement("a");
a.href = URL.createObjectURL(blob);
a.download = "myassets.json";
a.click();
console.log("Downloaded " + allAssets.length + " assets!");
})();
Upload Your Assets File
Upload the myassets.json file you just downloaded:
Drop your myassets.json here
or
Scan Results
Upload your assets file to see the scan results