• Unity VSCode一些插件


    创建C#控制端项目

    https://www.freesion.com/article/5288179294/

    插件

    Code Spell Checker
    可以帮助我们检查单词拼写是否出现错误,检查的规则遵循 camelCase (驼峰命名法)。

    Error Lens
    Error Lens 是一款把代码检查(错误、警告、语法问题)进行突出显示的插件。Error Lens 通过使诊断更加突出,增强了语言的诊断功能,突出显示了由该语言生成的诊断所在的整行,并在代码行的位置以行方式在线打印了诊断消息。
    C#,C# Extensions
    提示C语言代码插件
    Auto-Using for C#
    自动导入并为尚未导入C#文件的引用提供智能感知。
    Code Runner
    代码运行的插件,支持C/C++/python/lua/C#等几十种语法
    Lua
    VSCode中编写Lua的插件,会进行语法检查

    断点

    调试断点可以进行条件断点,开始方式,在断点处右键鼠标

    在这里插入图片描述

    Emmylua(lua调试断点)

    下载扩展中下载EmmyLua插件
    安装JDK,要求1.8以上,在扩展选项中编辑JDK路径
    加上emmylua.java.home
    在这里插入图片描述

    在lua的入口处加上以下代码,路径记得改成自己的路径
    package.cpath = package.cpath … ‘;’ … ‘C:/Users/zhang/.vscode/extensions/tangzx.emmylua-0.5.5/debugger/emmy/windows/x64/emmy_core.dll’
    local dbg = require(‘emmy_core’)
    dbg.tcpConnect(‘localhost’, 9966)
    记得端口要一致
    在运行调试中添加emmyLua
    在这里插入图片描述

    自动添加
    在这里插入图片描述

    手动添加
    {
    “type”: “emmylua_new”,
    “request”: “launch”,
    “name”: “EmmyLua New Debug”,
    “host”: “localhost”,
    “port”: 9966,
    “ext”: [
    “.lua”,
    “.lua.txt”,
    “.lua.bytes”
    ],
    “ideConnectDebugger”: false
    }

    然后按F5运行lua即可了

    Debugger for Unity(Unity C# 调试断点)

    在launch.json中添加配置
    {
    “name”: “Unity Editor”,
    “type”: “unity”,
    “path”: “xxxx/项目名/Library/EditorInstance.json”
    “request”: “launch”
    },
    {
    “name”: “Windows Player”,
    “type”: “unity”,
    “request”: “launch”
    },
    {
    “name”: “OSX Player”,
    “type”: “unity”,
    “request”: “launch”
    },
    {
    “name”: “Linux Player”,
    “type”: “unity”,
    “request”: “launch”
    },
    {
    “name”: “iOS Player”,
    “type”: “unity”,
    “request”: “launch”
    },
    {
    “name”: “Android Player”,
    “type”: “unity”,
    “request”: “launch”
    },
    {
    “name”: “Xbox One Player”,
    “type”: “unity”,
    “request”: “launch”
    },
    {
    “name”: “PS4 Player”,
    “type”: “unity”,
    “request”: “launch”
    },
    {
    “name”: “SwitchPlayer”,
    “type”: “unity”,
    “request”: “launch”
    }
    选择Unity Editor,打好断点,F5运行就可以了

  • 相关阅读:
    synchronized 的锁类型
    MFC Windows 程序设计[340]之特效按钮的实现(附源码)
    Linux 中搭建 主从dns域名解析服务器
    HTML_案例1_注册页面
    渗透攻防Web篇-深入浅出SQL注入
    计算机网络模型(OSI架构、TCP/IP架构)
    第十六章 Dijkstra算法的讲解以及证明(与众不同的通俗证明)
    2 个python美化表格数据输出结果的工具,摸鱼简直心安理得~
    golang中移除切片索引位置的元素
    举例详解 TCP/IP 五层(或四层)模型与 OSI七层模型对比 (画图详解 一篇看懂!)
  • 原文地址:https://blog.csdn.net/weixin_44806700/article/details/126306023