当前位置:网站首页>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
边栏推荐
- How does MySQL create, delete, and view indexes?
- Utiliser la pile pour convertir le binaire en décimal
- Day22 deadlock, thread communication, singleton mode
- leetcode刷题:二叉树25(二叉搜索树的最近公共祖先)
- Leetcode skimming: binary tree 21 (verifying binary search tree)
- Session
- Static vxlan configuration
- leetcode刷题:二叉树19(合并二叉树)
- [learn microservices from 0] [03] explore the microservice architecture
- Steps of building SSM framework
猜你喜欢
Day-14 common APIs
如何将 @Transactional 事务注解运用到炉火纯青?
【PyTorch实战】用RNN写诗
.Net下极限生产力之efcore分表分库全自动化迁移CodeFirst
HZOJ #240. Graphic printing IV
Creation and assignment of graphic objects
BGP actual network configuration
leetcode刷题:二叉树25(二叉搜索树的最近公共祖先)
[crawler] avoid script detection when using selenium
Image pixel read / write operation
随机推荐
Charles: four ways to modify the input parameters or return results of the interface
ICLR 2022 | pre training language model based on anti self attention mechanism
聊聊Redis缓存4种集群方案、及优缺点对比
ICLR 2022 | 基于对抗自注意力机制的预训练语言模型
Leetcode question brushing: binary tree 26 (insertion operation in binary search tree)
基于NeRF的三维内容生成
高瓴投的澳斯康生物冲刺科创板:年营收4.5亿 丢掉与康希诺合作
【从 0 开始学微服务】【00】课程概述
数据库安全的重要性
Day-19 IO stream
Airserver automatically receives multi screen projection or cross device projection
Creation and assignment of graphic objects
谷歌浏览器如何重置?谷歌浏览器恢复默认设置?
[deep learning] image multi label classification task, Baidu paddleclas
Importance of database security
NPM instal reports agent or network problems
【二叉树】删点成林
Leetcode brush question: binary tree 24 (the nearest common ancestor of binary tree)
Session
@What is the difference between resource and @autowired?