godot-python icon indicating copy to clipboard operation
godot-python copied to clipboard

RPC Decorators do not work

Open matheus2740 opened this issue 5 years ago • 0 comments

using e.g. @rpcremote does not work properly (method does not get registered). I think you forgot to return decorated in :

def __call__(self, decorated):
        if isinstance(decorated, ExportedField):
            decorated.rpc = self.mod
        else:
            decorated.__rpc = self.mod

Workaround: use self.rpc_config('my_rpc_method', MethodRPCMode.REMOTE) in _ready() for now.

matheus2740 avatar Jul 04 '20 17:07 matheus2740