GODOT.CODE.VSCODE Godot与vscode踩的坑

1.Godot用vscode出现服务器连接失败

 

    godot做游戏一直出现vscode没法连接到godot编辑器

    记住后面的端口号,在【编辑器】-> 【编辑器设置】 -> 【网络】 -> 【调试适配器】 里把端口改成对应端口就行了

 

2.C++错误,无法创建实例

E 0:00:02:0424 can_instantiate: Cannot instance script because the associated class could not be found. Script: 'res://Script/player.cs'. Make sure the script exists and contains a class definition with a name that matches the filename of the script exactly (it's case-sensitive).
<C++ 错误> Method/function failed. Returning: false
<C++ 源文件> modules/mono/csharp_script.cpp:2388 @ can_instantiate()

脚本命名没有按照标准命名,比如player.cs,实际上要命名为Player.cs,首字母需要大写

 

3.检查器界面没有脚本导出的属性

用习惯unity,发现godot一直不出现导出的属性,以为是bug,后来才知道需要先build一下,这点unity还是可以的,热加载做的比较好,不过习惯问题也能将就。

 

posted @   风之郁闷  阅读(452)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· 单线程的Redis速度为什么快?
· 展开说说关于C#中ORM框架的用法!
· Pantheons:用 TypeScript 打造主流大模型对话的一站式集成库
· SQL Server 2025 AI相关能力初探
点击右上角即可分享
微信分享提示