0

I am currently doing an internship and I am working on a tool that needs to export a given assets (mostly prefabs) into asset bundles.

The main problem being that the functions needed for that are only available inside the editor, and I need to make it possible in a build since these assets are meant to be given by the user.

I already looked for a way to somehow use something else to replace the use of asset bundles, but the whole purpose of this is to then load it inside another built unity project.

I was once again stopped since the functions to load assets from a specific path (AssetDatabase.LoadAssetAtPath) are also locked behind the UnityEditor, and the only way to load for example a prefab, would be to use an asset bundle, which is already out of the question since it doesn't seem like it's available in a build.

And before someone asks me about this, I already looked at Addressables, Load.Resources and StreamingAssets folder and none of this can really help in this situation.

I also looked for asset bundles modding tools and they seem complicated to use for what I need.

I am quite lost and don't really know what I can now try to succeed with that.

Billy
  • 1
  • 2
  • I don't think there is a way to create AssetBundles on runtime ... beginning with that there isn't even a way to create assets like prefabs etc at runtime either ... why does it specifically need to be prefabs/asset bundles? You could probably rather export the User created content to another format (either go for a known FBX/OBJ/GTLF etc format or create a custom one) – derHugo Jun 02 '23 at 13:50
  • https://learn.unity.com/tutorial/assets-resources-and-assetbundles has a lot of info on this, I'd read it all carefully, then go back and try to get more answers on why they think they need to build new bundles at runtime. – Dustin_00 Jun 02 '23 at 14:09
  • Thank you for your answers, I'll see with my boss what direction we should now go – Billy Jun 02 '23 at 15:12

0 Answers0