任何仅限于字母字符( a 到 z 和 A 到 Z ), 数字( 0 到 9 )和 _ 的字符串都可以作为标识符. 此外, 标识符不能以数字开头. 标识符区分大小写( foo 和 FOO 是不同的).
extends Node2D
var abc = "aaaa"
var Abc = "bbb"
var _abc = "ccc"
var abc222 = "ddd"
# var 222abc = "eee"
func _ready():
print(abc)
print(Abc)
print(_abc)
print(abc222)
#print(222abc)
output
--- Debugging process started ---
Godot Engine v3.5.3.stable.mono.official.6c814135b - https://godotengine.org
OpenGL ES 2.0 Renderer: NVIDIA GeForce RTX 3060/PCIe/SSE2
aaaa
bbb
ccc
ddd
--- Debugging process stopped ---
标签:abc,笔记,---,var,Abc,gdscript,print,标识符
From: https://www.cnblogs.com/nanfengshe/p/18111641