Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Networking - Has Authority - Android

I've got a strange problem. I'm trying to get networking working in my Mobile App. I just create a session, fire an event and print a string. If I'm a client, I just join a session and firing the same event. My problem: If I use this App on two Mobile Phones (Android), both phones are printing "authority". If I use the Launcher in Unreal Editor it works pretty well.

Is there a solution for this?

alt text alt text alt text

Product Version: UE 4.19
more ▼

asked Jul 09 '18 at 09:30 AM in Blueprint Scripting

avatar image

30 2 5 9

avatar image mightyenigma Jul 09 '18 at 04:14 PM

Which BP class are these graphs from? Your GameInstance class?

avatar image OnlyAhoi Jul 10 '18 at 05:08 AM

No. The blueprint where I creating the session is a widget. The other one is an actor.

avatar image mightyenigma Jul 10 '18 at 05:13 AM

Hm. I have only ever tried using Session nodes in a gameinstance but I would still expect HasAuthority to be remote after Joining the other machine's session.

What happens if you use the IsServer node? does it return true or false?

avatar image OnlyAhoi Jul 10 '18 at 07:13 AM

I created the sessions now in a GameInstance, still the same behaviour. IsServer is a good idea, it returns on the device where I called "create session": "true". On the device where i join the session it returns "false".

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Okay, use IsServer node instead of the Authority switch, just for this scenario anyway.

Authority switch doesn't always mean server vs client, it just means that for the Actor or Object on which it executes, does that actor or object have the Authority role or a remote role. This USUALLY means server vs client but not in every situation. Sometimes an object on the client can have the authority role. It just basically, as far as I understand it, means, whose version of reality counts as the one in charge, the source of "truth" since both machines have to run their own copies of the universe.

more ▼

answered Jul 10 '18 at 04:41 PM

avatar image

3.7k 18 23 20

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question