I’m trying to publish a package and then programmatically get all the asset ids but I get 400 error. Apparently there is a bundleid I can use with GetBundleDetailsAsync, but I don’t know how to get the bundleid.
I landed on this eventually - https://developer.roblox.com/en-us/articles/roblox-packages and created a package but when I go right-click Copy ID in game explorer to clipboard and use that for GetAssetIdsForPackage, it still gives a 400 error. I also tried bundleDetails = game:GetService(‘AssetService’):GetBundleDetailsAsync
Searching in the forums, the recommendation was to use the bundleid. eg:
But fair enough, perhaps that is some historical thing or perhaps it’s specific to some kind of not really a package bundle. I was grasping at straws, and the posting instructions ask me to list everything I tried.
Still, to be honest, I think my ‘misconception’ is a bit beside the point. Question really was how to get the int64 PackageAssetId and use this api:
ArrayGetAssetIdsForPackage ( int64 packageAssetId ) [yields] Returns an array of assetIds that are contained in a specified package.
Packages and bundles are two different things. Packages in reference to character meshes is a legacy name which is now used for a set of reusable items. Bundles refers to character meshes now.
You are not able to publish a bundle to the website. BundleDetails is restricted for bundle ids (a separate id system) and GetAssetIdsForPackage is for older bundles that still have an id on the main catalog id system, though this function should not be used any longer (should be deprecated if it isn’t).
In a package itself, there is no way to get the assets inside a package without loading the whole thing into Studio, because you aren’t publishing those as assets, only the package.
Many thanks for the explanation. I was hoping there was a way to get the internal ids. From my reading it seemed like nested packages were possible. Eg:
Ah, that’s what you were looking for. There is currently no way to get the related asset ids of nested packages at the moment. Packages are currently in beta and this may or may not end up being a feature. If it isn’t planned, you can always write a feature request for it provided significant use case for having access to this kind of a thing.