How to create remote variable in GDNative C++

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Roket

I know that I can create a method for rpc something like this:

void Rifle::_register_methods()
{
    register_method("_shoot", &Rifle::_shoot, GODOT_METHOD_RPC_MODE_SYNC);
}

And call it: rpc("name")

Сan i create a variable that i can modify remotely?

:bust_in_silhouette: Reply From: Roket
register_property<PlayerControl, Vector2>("puppet_position", &PlayerControl::puppet_position, Vector2(0, 0), GODOT_METHOD_RPC_MODE_SLAVE);