- Home /
Loading prefabs with script references from assetbundle
Hi guys !
My problem is here: I'd like to load prefabs from my assetbundle in order to instantiate them in my scene. But when I try to load my prefab, it seems that the script reference in still here but it dosn't find the script ITSELF.
Here's what I get when I drag my prefab manually in my scene (look at the pb.png)
And here's what I get when I load my prefab from my assetbundle (look at the pb2.png)
It seems that the reference is still here, but the C# logo is not there anymore. Obviously, when I try to run the game, I get "The referenced script on this Behaviour is missing" error.
Maybe my assetbundle build was built in a wrong way... but I know that assetbundles cannot contain scripts. So I don't know how to do since I want to load prefabs that contains scripts.
Thank you in advance for your help !
I'm having the same problem... Using Unity 5.3.04f and it happens when a scene contains objects with scripts on them or prefabs with scripts on them. It's intermittent however, some scripts get lost and other ones don't... Not sure why