[英]How to print an URL in a c# #error preprocessor in Unity3D?
我正在写一些Unity模块。
它们中的一些相互依赖,所以我想打印出一个错误,包括URL到哪里得到丢失的模块。
我试过这个:
#if !THIS_MODULE
#define THIS_MODULE
#endif
#if !REQUIRED_MODULE
#error This Module requires the RequiredModule module
#error Please get it from "https://example.com"
#endif
如果缺少所需的模块,则第一行只是按预期在Unity3D控制台中打印出来
error CS1029: #error: 'This Module requires the RequiredModule module'
但第二行只打印
error CS1029: #error: 'Please get it from "https:'
我试着和没有"
和'
除了在输出中添加"
或'
,这不会改变任何东西
我试过了
#error Please get it from "https:\\/\\/example.com"
但比它打印
#error: 'Please get it from "https:\\/\\/example.com"'
如何使用Unity中的#error
预处理器严格打印URL?
我有什么逃避规则吗?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.