Unity3D中出现错误"Assertion failed: TLS Allocator ALLOC_TEMP_THREAD, underlying allocator ALLOC_TEMP_THREAD has unfreed allocations"
0x0 背景
在Unity3D 2017.3.0f3中一直报错: "Assertion failed: TLS Allocator ALLOC_TEMP_THREAD, underlying allocator ALLOC_TEMP_THREAD has unfreed allocations, size 87488"
激活和取消激活Game Object都会报一次 进了Play Mode更是疯狂报错
在Issue Tracker中搜索发现在IOS开发中有人遇到同样的报错 可是我是安卓环境吖.....
0x1 解决
把FIle > Build Settings > Player Settings > Other Settings > Configuration > Scripting Runtime Version 从 .Net3.5 改到 .Net4.6, 然后重启Unity发现没有报错了
接着再来一次改回 .Net3.5, 重启, 还是没有继续报错 √ 神奇
仅供参考, 因为不确定是否大家出的问题一样~
0x2 源
方法来自"BILGISOFT"在Issue Track中的评论 :
Issue Track链接 : https://issuetracker.unity3d.com/issues/assertion-alloc-temp-thread-dot-dot-dot-appears-when-closing-unity-in-playmode-with-unsaved-scene