- Home /
Question by
Kiyaku · Feb 03, 2011 at 11:02 AM ·
assetbundleload
AssetBundle.mainAsset works but not .Load("name")
Code: http://pastebin.com/R6PmTtP7
Situation: I have a prefab called "PeekABoo" (checked spelling), which contains a few scripts and some childs.
I use the Bundle Export Script from the Unity3d website to export it.
To export it, i right click the "PeekABoo" prefab and export it with Tracking Dependency.
But if i want to spawn it, it works when i use "mainAssets" but not when i use "Load".
Anyone an idea what could be wrong?
Thanks!
Comment
Answer by kablammyman · Aug 25, 2011 at 10:00 PM
you can only load it with the WWW class. If you want to load it from your local drive, use the file protocol instead of http
WWW www = new WWW("file://C:\mydir\PeekABoo.unity3d");