当前位置:网站首页>Unity VS—— VS中默认调试为启动而不是附加到Unity调试
Unity VS—— VS中默认调试为启动而不是附加到Unity调试
2022-07-25 20:36:00 【ۓ明哲ڪ】
声明:本文为个人笔记,用于学习研究使用非商用,内容为个人研究及综合整理所得,若有违规,请联系,违规必改。
文章目录
开发环境
Unity 2018.2.3
Visual Studio 2019(以下简称VS)
一、问题描述
通过Unity打开脚本后 visualstudio调试按钮显示为启动而非附加到Unity.如下图一所示:
图一(错误效果)
图二(正确效果)
二、问题原因及解决方案
问题产生原因:
原因一——可能未安装对应工具
猜测可能是因为VS为后期自己安装,而非安装Unity时通过它提供的选项下载安装导致VS的调试未和Unity进行完全关联(仍可通过VS菜单栏调试——附加到Unity程序进行调试,但VS默认显示按钮为启动而非附加到Unity).
原因二:当前版本对高版本VS部分功能默认不支持
Unity2018对应的默认下载VS为2017,可能该版本Unity并不能很好的支持VS2019
解决方案:
通用步骤:
打开VS安装程序 Visual Studio Installer —— 修改——单个组件——搜索Unity,并安装Visual Studio Tools for Unity.
图三
图四
打开Unity——Editor—— Preferences——External Tools —— External Script Editor选择对应VS,并且Editor Attaching勾选上.如下图所示

图五
以下解决方案均在通用步骤完成后才能进行.
解决方案一:
VS菜单栏—调试选项—附加到Unity程序调试—选择对应设备
解决方案二(推荐):
将Visual Studio 2017 Tools.unitypackage 导入Unity.文件位置如下
C:\Program Files (x86)\Microsoft Visual Studio Tools for Unity\15.0 
关闭重新启动Unity和VS即可.(查看)
总结
保持饥饿,保持愚蠢.
这世界唯一能够相信的就是你付出的努力和你走过的路.
边栏推荐
- [advanced mathematics] [4] indefinite integral
- Card link
- 【高等数学】【1】函数、极限、连续
- Open source SPL enhances mangodb computing
- qml 结合 QSqlTableModel 动态加载数据 MVC「建议收藏」
- Cloud native, Intel arch and cloud native secret computing three sig online sharing! See you today | issues 32-34
- Jmeter——接口测试
- Stock software development
- Vulnhub | dc: 5 | [actual combat]
- [today in history] July 1: the father of time-sharing system was born; Alipay launched barcode payment; The first TV advertisement in the world
猜你喜欢

Google guava is just a brother. What is the real king of caching? (glory Collection Edition)
![[noi simulation] string matching (suffix automata Sam, Mo team, block)](/img/db/3ccb00e78bba293acdae91ffa72a2c.png)
[noi simulation] string matching (suffix automata Sam, Mo team, block)
![[today in history] July 18: Intel was founded; The first photo was posted on the world wide web; EBay spins off PayPal](/img/7d/7a01c8c6923077d6c201bf1ae02c8c.png)
[today in history] July 18: Intel was founded; The first photo was posted on the world wide web; EBay spins off PayPal

结构体,枚举类型与联合体
![[today in history] July 3: ergonomic standards act; The birth of pioneers in the field of consumer electronics; Ubisoft releases uplay](/img/18/b06e2e5a2f76dc2da1c2374b8424b3.png)
[today in history] July 3: ergonomic standards act; The birth of pioneers in the field of consumer electronics; Ubisoft releases uplay

Kubernetes advanced part learning notes

Go language go language built-in container

test

【高等数学】【5】定积分及应用
![[today in history] June 28: musk was born; Microsoft launched office 365; The inventor of Chua's circuit was born](/img/bf/09ccf36caec099098a22f0e8b670bd.png)
[today in history] June 28: musk was born; Microsoft launched office 365; The inventor of Chua's circuit was born
随机推荐
TGA file format (waveform sound file format)
Three skills of interface request merging, and the performance is directly exploded!
Card link
[today in history] June 28: musk was born; Microsoft launched office 365; The inventor of Chua's circuit was born
[workplace rules] it workplace rules | poor performance
2022.7.24-----leetcode.1184
How much memory does bitmap occupy in the development of IM instant messaging?
Kubernetes advanced part learning notes
Web crawler principle analysis "suggestions collection"
10. < tag dynamic programming and subsequence, subarray> lt.53. maximum subarray and + lt.392. Judge subsequence DBC
JVM (XXIII) -- JVM runtime parameters
[matlab] download originality documents based on oil monkey script and MATLAB
[cloud native | learn kubernetes from scratch] VIII. Namespace resource quotas and labels
Proxy implements MySQL read / write separation
Array of sword finger offer question bank summary (I) (C language version)
Rand1 generates rand9
Solution to oom exceptions caused by improper use of multithreading in production environment (supreme Collection Edition)
从底层结构开始学习FPGA(16)----PLL/MMCM IP的定制与测试
DIY personal server (DIY storage server)
使用cookie登录百度网盘(网站使用cookie)