当前位置:网站首页>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
边栏推荐
- [learn wechat from 0] [00] Course Overview
- 【从 0 开始学微服务】【02】从单体应用走向服务化
- Common knowledge of one-dimensional array and two-dimensional array
- 货物摆放问题
- MPLS experiment
- Master公式。(用于计算递归的时间复杂度。)
- HZOJ #240. Graphic printing IV
- Aike AI frontier promotion (7.7)
- How to use PS link layer and shortcut keys, and how to do PS layer link
- @What is the difference between resource and @autowired?
猜你喜欢
![[statistical learning methods] learning notes - improvement methods](/img/c5/515f171995da8e424de290228b54f8.png)
[statistical learning methods] learning notes - improvement methods

IPv6 experiment

Airserver automatically receives multi screen projection or cross device projection

【PyTorch实战】用PyTorch实现基于神经网络的图像风格迁移

Decrypt gd32 MCU product family, how to choose the development board?

Multi row and multi column flex layout

Vxlan static centralized gateway

2022 practice questions and mock examination of the third batch of Guangdong Provincial Safety Officer a certificate (main person in charge)

Cookie

【统计学习方法】学习笔记——第五章:决策树
随机推荐
[statistical learning method] learning notes - support vector machine (Part 2)
Day21 multithreading
Aike AI frontier promotion (7.7)
[learn microservices from 0] [03] explore the microservice architecture
Day-14 common APIs
Several ways to clear floating
layer弹出层的关闭问题
[binary tree] delete points to form a forest
HZOJ #236. Recursive implementation of combinatorial enumeration
test
Object. Simple implementation of assign()
Day-24 UDP, regular expression
Airserver automatically receives multi screen projection or cross device projection
Find ID value MySQL in string
Creation and assignment of graphic objects
智云健康上市:市值150亿港元 SIG经纬与京新基金是股东
【统计学习方法】学习笔记——第四章:朴素贝叶斯法
高瓴投的澳斯康生物冲刺科创板:年营收4.5亿 丢掉与康希诺合作
.Net下极限生产力之efcore分表分库全自动化迁移CodeFirst
如何将 @Transactional 事务注解运用到炉火纯青?