Hide Warn Global In Unity

Sometime, The warn info are turn into error msg in unity's console, Although we can find the error msg in the end of msg's detail,But when we have a lot of warn, It can't be showed until you fixed most of the warn.So we need to hide the warn infos simplely.

There are some way to do that,

1、you can disable them via a pragma at the top of your script file  

#pragma warning disable 0168 // variable declared but not used.
#pragma warning disable 0219 // variable assigned but not used.
#pragma warning disable 0414 // private field assigned but not used.

(when you need to restore,you can do it like this: #pragma warning restore 0168 )

2、Global Hide

create a file n name it smcs.rsp(gmcs.rsp ,us.rsp). Save this file under your "assets/" folder,just type "-nowarn:168" 


mark:

1.The problem is often caused by some code trigged InternalErrorException.

2.168 is the numeric part of the warning identifier(CS0168).


Reference Url

https://msdn.microsoft.com/zh-cn/library/7f28x9z3.aspx

http://docs.unity3d.com/Manual/PlatformDependentCompilation.html

http://manpages.ubuntu.com/manpages/jaunty/man1/gmcs.1.html

http://answers.unity3d.com/questions/49540/pragma-warning-disable-on-a-global-scale-from-with.html

http://answers.unity3d.com/questions/21796/disable-warning-messages.html

http://answers.unity3d.com/questions/428915/many-warning-as-internal-error.html

展开阅读全文

Windows版YOLOv4目标检测实战:训练自己的数据集

04-26
©️2020 CSDN 皮肤主题: 大白 设计师: CSDN官方博客 返回首页
实付0元
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、C币套餐、付费专栏及课程。

余额充值