Skip to content

如何在ts代码中使用ReplicatedUsing? #1855

Answered by kimxee
kimxee asked this question in Q&A
Discussion options

You must be logged in to vote

更正一下,实际上rpc和uproperty.ReplicatedUsing=“OnTestNumberChange”的写法都是可以支持的。需要注意的是,ReplicatedUsing这种回调,只有服务器触发属性改变,客户端才会触发,服务器想触发需要手动调用。
另外所有这种返回为void的函数,一定要注意在函数声明里把:void带上,不能空着。空着的话,rpc就无法识别调用了。

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@kimxee
Comment options

@BlurryLight
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by kimxee
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants