报错
文章平均质量分 75
天富儿
这个作者很懒,什么都没留下…
展开
-
UnityAndroid加载AssetBundle包时Shader遇到的问题
项目需求就是加载AssetBundle包资源,但Android项目实机测试时,部分Shader会失效,变成粉红色。:我这边测试之后并不好用,原因是该项目的需求限制,并不能在打包前将所需的Shader都添加上去。原创 2022-10-21 14:23:40 · 3136 阅读 · 0 评论 -
Unity使用Excel.dll报错ICSharpCode.SharpZipLib.dll版本冲突错误
Excel.dll报错ICSharpCode.SharpZipLib.dll版本冲突原创 2022-10-13 16:01:52 · 1136 阅读 · 0 评论 -
Unity在安卓Build时报错解决:CommandInvokationFailure和编译器 (1.8.0-adoptopenjdk) 中出现异常错误
这个我是发现一系列的错误都在于这个Build问题,这里都列举一下:在网上查找的解决方案,原文链接如下:https://www.jianshu.com/p/e0f97d6933a5。里面有3个方案,里面我用的第一个就可以了,其他的没有测,这里转载一下。原创 2022-09-08 18:04:00 · 4411 阅读 · 0 评论 -
Unity之iOS报错Audio effect Resonance Audio Renderer could not be found.
Audio effect Resonance Audio Renderer could not be found. Check that the project contains the correct native audio plugin libraries and that the importer settings are set up correctly.转载 2022-08-31 11:20:44 · 310 阅读 · 0 评论 -
Unity:ReadPixels was called to read pixels from system frame buffer, while not inside drawing frame.
Unity截屏报错:ReadPixels was called to read pixels from system frame buffer, while not inside drawing frame.报错解决方案原文链接报错UNITY截图屏幕的时候,如果直接使用:// 先创建一个的空纹理,大小可根据实现需要来设置Texture2D screenShot = new Texture2D((int)rect.width, (int)rect.height, TextureFormat.RGB24转载 2022-03-23 15:57:58 · 2952 阅读 · 1 评论 -
Unity-Android的il2cpp模式编译报错解决
Unity很早就提供了Android il2cpp的编译接口,谣传il2cpp效率提升了一些,让出了一些效率给渲染。还有一个好处破解难度升级,mono时代反编译dll就好,il2cpp的**.so文件破解难度增加。最近反编译大厂的游戏很多游戏也开始使用il2cpp**。但是如果项目第一次编译il2cpp可能会报错,报错如下:Failed running D:\Unity562p4\Editor\Data\il2cpp/build/il2cpp.exe --convert-to-cpp --emit-n转载 2021-11-11 18:21:25 · 3467 阅读 · 0 评论 -
Unity项目发布iOS版本DLL中的构造函数丢失问题
Unity项目发布iOS版本DLL中的构造函数丢失问题报错问题解决办法静态实例link.xml原文链接报错问题比如某个dll中有一个类:public class A{ public A(){}}如果工程中,没有显式调用new A(),在使用il2cpp方式构建时,这个A()会被剔除掉。最终的程序包里也就没法找到这个默认构造了。解决办法静态实例找一个位置定义一个无用的静态实例,如static A _unusedA = new A();这样就相当于A()被使用了,不会被剔除。问题是转载 2021-08-10 14:18:41 · 344 阅读 · 2 评论 -
Unity打包IOS相关设置和麦克风延迟问题的解决办法
Unity打包IOS相关设置和麦克风延迟问题的解决办法引子问题一:调用`Microphone.Start()`方法的时候主线程明显卡顿问题二:IOS使用麦克风时声音不会从扬声器里发出来问题三:IOS使用麦克风或者相机的程序打包到Xcode运行时会闪退。问题四:正确设置麦克风之后记录得到的数据使用`audio.clip.GetData()`方法时报错Error executing result = instance->m_Sound->lock(offsetBytes, lengthBytes,转载 2021-08-09 17:04:39 · 1165 阅读 · 0 评论 -
Unity报错:success && actual == (UInt64)size
success && actual == (UInt64)sizeUnityEditor.HostView:OnGUI()Building - Failed to write file: sharedassets0.assetsUnityEditor.HostView:OnGUI()Error building Player: Couldn’t build player because of unsupported data on target platform.报这个错的原因.转载 2021-08-06 14:32:44 · 354 阅读 · 0 评论 -
Failed to load ‘Assets/Plugins/******.dll‘ with error ‘找不到指定的模块。
Failed to load 'Assets/Plugins/******.dll' with error '找不到指定的模块。项目场景:问题描述:原因分析:解决方案:项目场景:Unity版本:2018.3.0 64位目标平台:win10 64位dll开发语言:C++dll编译器:VS2017提示:这里简述项目相关背景:例如:项目场景:示例:通过蓝牙芯片(HC-05)与手机 APP 通信,每隔 5s 传输一批传感器数据(不是很大)问题描述:提示:这里描述项目中遇到的问题:例如:数据传输原创 2020-11-27 15:30:48 · 2538 阅读 · 0 评论 -
Unity使用LitJson保存数据报错:Max allowed object depth reached while trying to export from type System.Single
在进行类转json字符串时,报错:JsonException: Max allowed object depth reached while trying to export from type System.Single。ok,实际上是类的属性中有json不能识别的数据类型。JsonData可以解析的数据类型包括如下:public JsonData(bool boolean);public JsonData(double number);public JsonData(int number转载 2020-09-02 22:44:53 · 2446 阅读 · 1 评论 -
Unity使用LitJson解析报错:JsonException: Invalid character ‘‘ in input string
Unity使用LitJson解析报错:JsonException: Invalid character '' in input string报错现象解决UTF-8与UTF-8 BOM一、一个汉字在不同的编码方式中占多少字节?二、UTF-8与UTF-8 BOM三、创建UTF-8(而非UTF-8 BOM)文件的方法参考文档报错现象我在Unity中使用LitJson.dll解析json文件,报如下错误:JsonException: Invalid character ‘’ in input strin原创 2020-08-31 23:04:52 · 5198 阅读 · 1 评论 -
Unity报错NotSupportedException: Encoding 936 data could not be found.
Unity报错NotSupportedException: Encoding 936 data could not be found.报错原因与解决报错在Unity3d 编辑器下运行没有任何问题,打包出exe文件执行时,便会出现程序无响应的情况,查看日志文件可以看到如下错误:NotSupportedException: Encoding 936 data could not be found. Make sure you have correct international codeset asse转载 2020-08-07 15:10:01 · 3062 阅读 · 0 评论 -
Unity报错“UnityException: Texture ‘XXX‘ is not readable”
Unity报错“UnityException: Texture 'XXX' is not readable”报错解决方法报错UnityException: Texture ‘XXX’ is not readable, the texture memory can not be accessed from scripts. You can make the texture readable in the Texture Import Settings.解决方法...原创 2020-07-27 16:59:27 · 4100 阅读 · 0 评论 -
Unity使用Skinned Mesh Renederer的BlendShapes时,报错“Platform does not support compute shaders”
Unity使用Skinned Mesh Renederer的BlendShapes时,报错“Platform does not support compute shaders”报错原理及解决方法报错项目中需要使用Skinned Mesh Renederer的BlendShapes功能。当导入模型,并拖拽到场景中,尝试改变BlendShapes中的数值时。项目发生报错”Platform does not support compute shaders”。如图。原理及解决方法详细查阅了各种资料,找原创 2020-07-27 15:29:08 · 1086 阅读 · 0 评论 -
VS中报错“预定义类型system.void未定义或导入”
VS中报错“预定义类型system.void未定义或导入”问题描述解决问题描述Unity中没有任何报错的显示,如图:Viscal Studio中却出现大量报错:“预定义类型system.void未定义或导入”,如图:解决经过查找终于找到了解决方案:在Unity中通过Edit->Project Settings->Player的路径打开窗口,将窗口中的Api Compatibility Level选项设置为.NET 4.x即可。如图:...原创 2020-06-09 13:50:13 · 8335 阅读 · 0 评论 -
Unity2018的shader中LIGHT_ATTENUATION()报错的解决方案
文章目录描述错误原因修改后参考描述错误在将Unity5.5.0版本的项目转换成Unity2018.1.1的项目时,一个玻璃的shader报错了。错误信息:Shader error in ‘Shader Forge/Examples/Refraction’: syntax error: unexpected token ‘;’ at line 261 (on d3d11)根据上面的报错信息,我们定位错误位置:错误代码:float attenuation = LIGHT_ATTEN原创 2020-05-30 18:47:21 · 1958 阅读 · 0 评论 -
Unity编译时找不到AndroidSDK的问题 | Unable to list target platforms
Unity编译时找不到AndroidSDK的问题 | Unable to list target platforms现象原因过程解决方案现象在用 Unity 编译 Android 平台的应用时,遇到 Unable to list target platforms 的问题。详细错误描述如下:Error:Invalid command androidUnityEditor.BuildPl...转载 2020-02-14 09:04:44 · 1141 阅读 · 0 评论