Skip to content

Commit cba872d

Browse files
authored
Create 00.Understand.Prefixes.md
1 parent 7013895 commit cba872d

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

00.Understand.Prefixes.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# 理解前缀
2+
3+
作为开篇,有必要先解释一下一些简单的变量和函数前缀,以防你在后面的阅读中迷路了。
4+
5+
# 变量前缀
6+
7+
- `__const` 常量,如果你遇到这样的指令:`0x00000000000040E4 PUSH 0x00000000000000AB(__const_SystemInt32_2[System.Int32])`,并且你正在使用 UdonSharpDisassembler,你可以尝试在转储的常量文件中搜索 `0x00000000000000AB` 以得到直接的值(仅支持基本类型)。
8+
- `__intnl` 代理变量/临时变量,通常是用于当做寄存器使用的一次性变量,用于代理原变量接受值并将变量内容转交给`原变量`或者直接使用代理变量。
9+
- `_` 私有变量/局部变量,即 `private` 变量,不对外公开的变量和函数都会带有这样的前缀。 *[1]*
10+
11+
`[1]` 可能存在部分错误。
12+
13+
# 函数前缀
14+
15+
- `_` 私有函数,无法被 `SendCustomNetworkEvent` 调用的函数,不能通过网络调用。(RPC广播)

0 commit comments

Comments
 (0)