I have two projects that need to communicate with one another. One is the designated Host, while the other is always the peer. I've managed to get all versions so far to play nice with one another, however, I decided to try my hand at real-time multiplayer.
However, I'm getting something odd happening.
These are screenshots of the code for each project. The online aspects, connecting to each other, is in a separate event sheet for both projects. This is just the real-time code.
And here are the resulting debugs.
Note that the 2 PeerIDs in the instance variables are different... yet the two objects are one and the same. When it's created on the Host, it is automatically created on the Peer. Also, when I change the position of the object on the Host, it automatically moves on the Peer side.
So why is it that their PeerIDs are different? In fact, looking into it a bit closer, I can see that the ID on the Host side is showing the Peer's ID... which is correct. However, on the Peer's side, it's showing the Host's ID.
How is it even grabbing that information?
I have followed the real-time multiplayer example, and don't see what is causing this issue! The example states "When a Peer is created from 'Sync object', Multiplayer.PeerID has the ID of the peer that the object represents."
Why isn't this the case for me?