I feel like I’m getting close with sending data up to my dedicated server, but I think I’m missing something important.
I have a dedicated server
I launch the client, and click my widgetblueprint which connects me to the dedicated server [ do I need to do something special here to communicate upstream from myCharacterController? ]
The client switches maps to myLoginLevel which presents the user with a login form.
clicking this form calls my C++ code below.
The result is that on the client I see Not Authority, and on the server I see nothing.
A method marked as server isn’t “server only”, it means it’s called remotely on the server by the client. So if you want to get info from the server, you should called a method like “GetAuthorizationInfo” which is marked as server. This then calls a function marked Client, which will be run remotely on the client.
Something like:
UPROPERTY(Server, WithValidation)
void GetAuthorizationInfo();
// valid/imp methods
UPROPERTY(Client)
void SendAuthorizationInfo( const FString& PlatformID, const FString& MatchKey );
// imp method
void MyClass::GetAuthorizationInfo_Implementation()
{
SendAuthorizationInfo( some string, some other string );
}
void MyClass::SendAuthorizationInfo_Implementation( const FString& PlatformID, const FString& MatchKey )
{
// do stuff on client here
}
Or just add these values are variables which are marked as replicated (and don’t forget the replication override method.)