All Oculus Quest developers MUST PASS the concept review prior to gaining publishing access to the Quest Store and additional resources. Submit a concept document for review as early in your Quest application development cycle as possible. For additional information and context, please see Submitting Your App to the Oculus Quest Store.
Note: You are viewing the Unreal version of this topic. To view this topic for Unity development, see Peer-to-Peer Networking (Unity). To view this topic for native development, see Peer-to-Peer Networking (Native).
Peer-to-Peer (P2P) networking allows your app to establish a connection and send data directly between users.
There are a number of uses for P2P networking. Some common implementations include, using P2P to exchange chat messages between users, updating gameplay data in lower latency, or update avatar positions in real-time. Our P2P service connects users to exchange data directly.
The Oculus Platform P2P allows you to choose between two send policies to transmit data depending on your use-case and the needs of your app.
P2P data may be routed through relay servers located inside Facebook's infrastructure when connecting to client devices that are behind network address translation (NAT), if a connection cannot be established from their detected external address. The VoIP data passing through a relay server is not inspected any more than is necessary to forward to the recipient; nor is it retained.
P2P networking between users is handled by Unreal’s UNetDriver and most situations do not require any additional integration. To enable P2P ensure that the following is added to your DefaultEngine.ini file.
[/Script/Engine.GameEngine] +NetDriverDefinitions=(DefName="GameNetDriver",DriverClassName="OnlineSubsystemOculus.OculusNetDriver",DriverClassNameFallback="OnlineSubsystemUtils.IpNetDriver") [/Script/OnlineSubsystemOculus.OculusNetDriver] NetConnectionClassName="OnlineSubsystemOculus.OculusNetConnection"
If you’d like the client to act as the host of a game, you may add Set Is Server to your map.