Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Godot4.1.1:关于自定义节点 #1

Open
LvoryTowerBeta opened this issue Sep 6, 2023 · 1 comment
Open

Godot4.1.1:关于自定义节点 #1

LvoryTowerBeta opened this issue Sep 6, 2023 · 1 comment

Comments

@LvoryTowerBeta
Copy link

LvoryTowerBeta commented Sep 6, 2023

https://github.com/zfoo-project/godot-start/blob/main/doc/demo01_hello/5.node2d.md 的“自定义节点”的教程,在Godot4.1.1中并不适用。具体表现为:在脚本中编写自定义节点的相关代码时,出现了三处报错。
第一处是class_name MyNode, “res://icon.png”。MyNode后面不能有逗号,以及“res://icon.png”要移到下一行。
第二、三处是在两个export前面,目前export要在前面加@才能用。

2023.9.7 可能这只是个Godot3的教程,打扰了抱歉

@jaysunxiao
Copy link
Contributor

已经将文档更新到最新版本的godot 4.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants