Q:Unity 5.5.4p5版本采用AssetBundle加载资源(有依赖),有很大几率出现如下错误,怎么处理呢?
“The referenced script on this Behavior is missing!”, “The referenced script on this Behavior (Game Object ‘Prefab 1’) is missing!” and “GameObject (named ‘Prefab 1’) references runtime script in scene file. Fixing!” UWA:“The referenced script on this Behavior is missing!”,如果是Unity 5.0以后的打包方式,那么原因很可能是:脚本的序列化信息变化了,需要重新打包AssetBundle来修复这个问题。
而如果是Unity 4.x的老版本打包方式,那么除上述原因外,还有一种可能是脚本处于依赖的AssetBundle中,而后续AssetBundle加载时,其依赖的AssetBundle还未加载成功或者已经被卸载,那么也会出现该问题。 该回答由UWA提供,欢迎大家转至社区进行进一步交流: