Unity5.x 资源加载Bug
2016-08-16 16:06
218 查看
做一次做项目的时候, 将Unity4.x版本的游戏升级到Unity5.x后,资源打包需要从新做。(这块内容后期会写一个专门的题材),从新做完后,加载资源的时候界面都正常加载了,但是Editor 加载完界面报错,错误代码如下:
The referenced script on this Behaviour(GameObject ‘SystemChannelB’) is missing!
A script behaviour(script unknown or not yet loaded)has a different serialization layout when loading.(Read 32 bytes but expected 56 bytes) Did you #iddef UNITY_EDITOR a section
of your serialized properties in your scripts?
Prefab has mulitiple Transform components! removing them automatically would not be safe
GameObject(named ‘SystemChannelB’)references runtime script in scene file.Fixing!
经过了大概三天的调试,和查找,终于把则这个问题解决了。
就是SystemChannelB 这个组建其实是没有的,但是在打包前这个组建存在,打包后这个组建被删除了,所以加载的时候,资源会找这个组建,导致报错如上。
解决方法:
将包含这个组建的预制体里面的这个组件删除,然后保存,然后冲洗打包成AssetBundle 。这样就可以解决问题。
百度和google 了很多这样类似的问题, 再次提高类型解决方案
http://answers.unity3d.com/questions/997644/gameobject-references-runtime-script-in-scene-file.html?page=3&pageSize=5&sort=votes
希望可以帮到大家。
The referenced script on this Behaviour(GameObject ‘SystemChannelB’) is missing!
A script behaviour(script unknown or not yet loaded)has a different serialization layout when loading.(Read 32 bytes but expected 56 bytes) Did you #iddef UNITY_EDITOR a section
of your serialized properties in your scripts?
Prefab has mulitiple Transform components! removing them automatically would not be safe
GameObject(named ‘SystemChannelB’)references runtime script in scene file.Fixing!
经过了大概三天的调试,和查找,终于把则这个问题解决了。
就是SystemChannelB 这个组建其实是没有的,但是在打包前这个组建存在,打包后这个组建被删除了,所以加载的时候,资源会找这个组建,导致报错如上。
解决方法:
将包含这个组建的预制体里面的这个组件删除,然后保存,然后冲洗打包成AssetBundle 。这样就可以解决问题。
百度和google 了很多这样类似的问题, 再次提高类型解决方案
http://answers.unity3d.com/questions/997644/gameobject-references-runtime-script-in-scene-file.html?page=3&pageSize=5&sort=votes
希望可以帮到大家。
相关文章推荐
- Unity异步加载AssetBundle方案,4.x版本资源加载(5.x版本资源可以参考插件AssetBundleManager)
- Unity5.x 资源打包和加载
- Mac OS X 10.9 文件(资源)选取窗长时间加载bug的修复
- Unity中加载资源的方法
- Unity资源路径及加载外部资源介绍
- unity动态加载远程资源
- Unity 3D 音乐播放器www异步加载外部资源
- Unity 关于资源加载的时间消耗
- Unity资源路径及加载外部资源介绍
- unity基础开发--实现动态加载资源
- unity 《专题系列》资源打包 Asset Bundles 第五节 Asset Bundles 依赖打包和加载
- Unity加载Web资源需求crossdomain.xml文件格式
- 「Unity」使用代码动态加载资源
- [unity基础教程]Unity3D实现动态加载游戏资源(转)
- Unity动态加载远程资源
- Unity3d流式加载资源文件
- Unity资源加载入门
- Unity之如何从AssetBundles加载资源
- setDefaultAlphaPixelFormat bug addSpriteFrames 异步加载资源
- unity 资源加载框架设计