Godot suggestion : add a naming possibility for @rpc

Hello there !

First of all THANK YOU ! I love Godot in all his parts. It is such an amazing tool !
I am so sorry if this message dosn’t belong here, I have no idea where to put it.
I looked in the github repository but didn’t find a forum category.

So I noticed when using rpc, the “@rpc” must be before the “func” declaration. Like this :

@rpc
func myfunc () :

As I am listing my function with no line in between, I’m using it this way :

@rpc func func1 () : 
@rpc func func2 () :
func func3 () :
@rpc ("any peer") func func4 () :

But as shown, is not aligned when sided with non @rpc function and harder to read.

So my demand is the following :
Would it be possible and easy to develop to possibly have it this way :

func myfunc () @rpc : 

Thanks you so much for your attention,
Voyou.

I am not sure if your suggestion is right, as it does not look proper I think. But you can request this feature in Godot Proposals. Forum is designed for help, showcase, etc, not suggestion requests.

1 Like

This also interferes with static typing:

func my_function() -> void @rpc:

Is this how you imagine it? or this?

func my_function() @rpc -> void:

I think this looks terrible and usually such changes arent done because someone likes to code a certain way.
But you can still try your luck with the link @KingGD provided

2 Likes