当前位置:网站首页>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即可.(查看)
总结
保持饥饿,保持愚蠢.
这世界唯一能够相信的就是你付出的努力和你走过的路.
边栏推荐
- redis源码 -ziplist
- 【高等数学】【5】定积分及应用
- Web crawler principle analysis "suggestions collection"
- Cloud native, Intel arch and cloud native secret computing three sig online sharing! See you today | issues 32-34
- CarSim simulation quick start (16) - ADAS sensor objects of CarSim sensor simulation (2)
- Fanoutexchange switch code tutorial
- If the order is not paid for 30 minutes, it will be automatically cancelled. How to achieve this? (Collection Edition)
- Principle analysis of bootloader
- [leetcode] 28. Implement strstr ()
- [today in history] July 4: the first e-book came out; The inventor of magnetic stripe card was born; Palm computer pioneer was born
猜你喜欢

9. < tag dynamic programming and subsequence, subarray> lt.718. Longest repeated subarray + lt.1143. Longest common subsequence

【高等数学】【4】不定积分
![[onnx] export pytorch model to onnx format: support multi parameter and dynamic input](/img/bd/e9a1d3a2c9343b75dbae5c7e18a87b.png)
[onnx] export pytorch model to onnx format: support multi parameter and dynamic input

Jmeter——接口测试
![[today in history] July 5: the mother of Google was born; Two Turing Award pioneers born on the same day](/img/7d/7a01c8c6923077d6c201bf1ae02c8c.png)
[today in history] July 5: the mother of Google was born; Two Turing Award pioneers born on the same day
![Summarize the level of intelligent manufacturing discussion [macro understanding]](/img/84/3addabdf857c562535a4085782d3e8.png)
Summarize the level of intelligent manufacturing discussion [macro understanding]
![[advanced mathematics] [5] definite integral and its application](/img/b2/62748b7533982f2b864148e0857490.png)
[advanced mathematics] [5] definite integral and its application

Introduction and construction of consul Registration Center

Technology cloud report: what is the difference between zero trust and SASE? The answer is not really important

Docker 搭建 Redis Cluster集群
随机推荐
【高等数学】【1】函数、极限、连续
Formatdatetime explanation [easy to understand]
股票软件开发
The database empties the table data and makes the primary key start from 1
[tensorrt] dynamic batch reasoning
[onnx] export pytorch model to onnx format: support multi parameter and dynamic input
[today in history] July 4: the first e-book came out; The inventor of magnetic stripe card was born; Palm computer pioneer was born
移动web布局方法
Proxy实现mysql读写分离
Principle analysis of bootloader
redis源码 -ziplist
什么是聚类分析?聚类分析方法的类别[通俗易懂]
[advanced mathematics] [1] function, limit, continuity
[MCU] 51 MCU burning those things
【高等数学】【8】微分方程
Interpretation of filter execution sequence source code in sprigboot
[today in history] July 5: the mother of Google was born; Two Turing Award pioneers born on the same day
Prescan quick start to master Lesson 19: prescan actuator configuration, track synchronization and non configuration of multiple tracks
Stock software development
Behind every piece of information you collect, you can't live without TA