Quantcast
Channel: Latest Questions on Unity Answers
Viewing all articles
Browse latest Browse all 171066

The referenced script on this Behaviour is missing! using BuildStreamedSceneAssetBundle

$
0
0
I have create an asset bundle SceneA.unity3d from sceneA and placed it at C:\Assetbundles. I have a second scene sceneB with a script that loads the assetbundle from C:\Assetbundles, SceneB has once gameObject with a script specific to loading SceneA. When sceneA is loaded I get "The referenced script on this Behaviour is missing!" on almost all object in the scene which have scripts. Why? Editor code... Debug.Log(BuildPipeline.BuildStreamedSceneAssetBundle(new string[] { sceneName }, bundleLoc + sceneName + ".unity3d", BuildTarget.StandaloneWindows)); Script Code... string sceneUrl = "file:://C:/AssetBundles/" + sceneName + ".unity3d"; WWW www = WWW.LoadFromCacheOrDownload(sceneUrl, 1); yield return www; if (www.error != null) { Debug.LogError(www.error); Debug.Log(sceneUrl); } else { Debug.Log("Done"); sceneAB = www.assetBundle; } Application.LoadLevel(sceneName);

Viewing all articles
Browse latest Browse all 171066

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>