当前位置:网站首页>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即可.(查看)
总结
保持饥饿,保持愚蠢.
这世界唯一能够相信的就是你付出的努力和你走过的路.
边栏推荐
- [today in history] July 4: the first e-book came out; The inventor of magnetic stripe card was born; Palm computer pioneer was born
- 【高等数学】【3】微分中值定理与导数的应用
- Socket error Event: 32 Error: 10053. Connection closing...Socket close
- How much memory does bitmap occupy in the development of IM instant messaging?
- Proxy实现mysql读写分离
- Automated testing ----- selenium (I)
- [today in history] July 2: BitTorrent came out; The commercial system linspire was acquired; Sony deploys Playstation now
- [today in history] July 19: the father of IMAP agreement was born; Project kotlin made a public appearance; New breakthroughs in CT imaging
- Cloud native, Intel arch and cloud native secret computing three sig online sharing! See you today | issues 32-34
- [advanced mathematics] [4] indefinite integral
猜你喜欢

Why did I choose to become a network engineer after graduating from weak current for 3 months
![[advanced mathematics] [8] differential equation](/img/83/b6b07540e3cf6d6433e57447d42ee9.png)
[advanced mathematics] [8] differential equation

Kubernetes advanced part learning notes

【单细胞高级绘图】07.KEGG富集结果展示

9. < tag dynamic programming and subsequence, subarray> lt.718. Longest repeated subarray + lt.1143. Longest common subsequence
![Vulnhub | dc: 5 | [actual combat]](/img/c6/34117bbfb83ebdf9e619f4e4590661.png)
Vulnhub | dc: 5 | [actual combat]

Card link

How to choose a microservice registration center?

Solution to oom exceptions caused by improper use of multithreading in production environment (supreme Collection Edition)

Online random coin tossing positive and negative statistical tool
随机推荐
Vulnhub | dc: 6 | [actual combat]
程序的编译和运行
[tensorrt] dynamic batch reasoning
Introduction to several scenarios involving programming operation of Excel in SAP implementation project
QML combines qsqltablemodel to dynamically load data MVC "recommended collection"
第六章 修改规范(SPEC)类
How to use buffer queue to realize high concurrent order business (glory Collection Edition)
Proxy实现mysql读写分离
ROS_ Rqt toolbox
test
接口请求合并的3种技巧,性能直接爆表!
Web crawler principle analysis "suggestions collection"
JS作用域与作用域链
LeetCode通关:哈希表六连,这个还真有点简单
Summarize the level of intelligent manufacturing discussion [macro understanding]
每条你收藏的资讯背后,都离不开TA
【NOI模拟赛】字符串匹配(后缀自动机SAM,莫队,分块)
JMeter - interface test
Arrow parquet
FanoutExchange交换机代码教程