• 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运行就可以了

  • 相关阅读:
    使用ansible-app2k8s管理和部署服务到 kubernetes
    Qt 串口通信(C++)
    选择工业交换机时,需要关注哪些方面的性能?
    C#开发的OpenRA游戏之世界存在的属性GivesExperience(4)
    杭电多校-Darnassus-(最小生成树本质+预处理+链式向前星)
    warning LNK4017: DESCRIPTION 语句不支持目标平台;已忽略
    Error:Kotlin: Module was compiled with an incompatible version of Kotlin
    分布式消息系统Kafka解析
    配置OSPF的DR选择事例(使用display ospf peer命令查看ospf的领居信息))
    国际油气公司数字化转型探析
  • 原文地址:https://blog.csdn.net/weixin_44806700/article/details/126306023