您的位置:首页 > 移动开发 > Unity3D

Unity使用过程中遇到的问题

2017-06-14 18:39 766 查看
一、Assets/NGUI/Examples/Scripts/InventorySystem/System/InvEquipment.cs(58,25):erro CS0266:Cannot implicitly canvert type 'UnityEngine.Component' to 'UnityEngine.Renderer'.An explict conversion exists(are you missiing a cast?)

过程:将NGUI文件夹移除后又安装了一次NGUI插件,两次安装的插件版本不一样



原因:对应的Unity版本需要安装与其相对应的NGUI插件

解决办法:安装正确的与Unity版本相对应的NGUI插件

二、Can't add script component 'MoveCamera' because the script clas cannot be found.Make sure that ther are no compile errors and that the file name and class name match.

过程:给Main Camera添加C#脚本时,出现如下弹框



原因:这个文件编译时可能出错

解决办法:关闭Visual Studio,然后重启,可以看到如下弹框,点击是



三、Please set the Bundle Identifier in the Player Settings.

过程:将unity导出成android的apk的时候出错



原因:需要先设置Player Settings。应该遵循如下惯例:com.公司名.项目名,可以包含数字、字母和下划线。不能以数字或下划线开头

解决办法:点击Build Settings下方的Player Settings,在Inspector视图下出现PlayerSettings界面



输入Company Name、Product Name、Package Name



四、在同一台电脑上打开多个项目

1.在开始菜单找到Unity的快捷方式,右键点击“属性”



2.选择“快捷方式”标签页,然后在目标的地方加上“-projectPath”,然后点击“确定”

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: