当前位置:网站首页>Unity 构建错误:当前上下文中不存在名称“EditorUtility”
Unity 构建错误:当前上下文中不存在名称“EditorUtility”
2022-07-07 10:46:00 【charlsdm】
您现在出现错误的原因是,Unity 在为其设计的编译时删除了“UnityEditor”命名空间。这就是为什么当您尝试在平台上使用它时,“EditorUtility”将永远不会存在于除 UnityEditor 之外的任何平台上。因为“EditorUtility”在“UnityEditor”命名空间中。
因此,如果您想使用“EditorUtility”执行与在 Unity 编辑器中所做的相同的工作,您应该像他们一样实现它。
#if UNITY_EDITOR
EditorUtility.DisplayDialog(“Great!”, “You got the pattern right!”, “Next Level!”);
#else
YOUROWNCLASS.DisplayDialog(“Great!”, “You got the pattern right!”, “Next Level!”);
#endif
边栏推荐
- 处理链中断后如何继续/子链出错removed from scheduling
- Cryptography series: detailed explanation of online certificate status protocol OCSP
- Object. Simple implementation of assign()
- leetcode刷题:二叉树21(验证二叉搜索树)
- IPv6 experiment
- Pule frog small 5D movie equipment | 5D movie dynamic movie experience hall | VR scenic area cinema equipment
- 基于NeRF的三维内容生成
- 高瓴投的澳斯康生物冲刺科创板:年营收4.5亿 丢掉与康希诺合作
- 2022 practice questions and mock examination of the third batch of Guangdong Provincial Safety Officer a certificate (main person in charge)
- How does MySQL create, delete, and view indexes?
猜你喜欢
Leetcode skimming: binary tree 22 (minimum absolute difference of binary search tree)
Leetcode skimming: binary tree 23 (mode in binary search tree)
Master formula. (used to calculate the time complexity of recursion.)
聊聊Redis缓存4种集群方案、及优缺点对比
[crawler] avoid script detection when using selenium
Common knowledge of one-dimensional array and two-dimensional array
2022A特种设备相关管理(锅炉压力容器压力管道)模拟考试题库模拟考试平台操作
leetcode刷题:二叉树19(合并二叉树)
[pytorch practice] write poetry with RNN
《ASP.NET Core 6框架揭秘》样章[200页/5章]
随机推荐
HZOJ #235. 递归实现指数型枚举
What if does not match your user account appears when submitting the code?
用mysql查询某字段是否有索引
[pytorch practice] write poetry with RNN
GCC compilation error
【PyTorch实战】用RNN写诗
非分区表转换成分区表以及注意事项
[Q&A]AttributeError: module ‘signal‘ has no attribute ‘SIGALRM‘
How to apply @transactional transaction annotation to perfection?
在字符串中查找id值MySQL
详解ThinkPHP支持的URL模式有四种普通模式、PATHINFO、REWRITE和兼容模式
智云健康上市:市值150亿港元 SIG经纬与京新基金是股东
《ASP.NET Core 6框架揭秘》样章[200页/5章]
What kind of methods or functions can you view the laravel version of a project?
Four functions of opencv
[difficult and miscellaneous]pip running suddenly appears modulenotfounderror: no module named 'pip‘
广州市召开安全生产工作会议
Day-24 UDP, regular expression
《ASP.NET Core 6框架揭秘》样章[200页/5章]
Financial data acquisition (III) when a crawler encounters a web page that needs to scroll with the mouse wheel to refresh the data (nanny level tutorial)