FirstModulAR 0.1.0
Loading...
Searching...
No Matches
FMAR Networking

The FMAR Networking Package is the core of all networking functionaly provided by FMAR. FMAR Networking is built on top of Unity's Netcode for GameObjects package.

Among the things provided by FMAR Networking, here are a few:

  • Server Management: The ability to connect to and save server addresses for reconnection at a later date. Servers host a smaller server on a separate port listening for pings from clients, and will respond with a message providing additional server details if a ping is received. This allows clients to scan the local network for available servers and display a list before connecting. This functionality is not fully integrated with the Widget system which was developed later, but would benefit from a stable user interface.
  • Client/Server Communication: The server maintains a list of connected clients, and has details (name, ip address) about those clients. This allows the server and other clients to communicate with each other effectively. Most importantly, this package creates the initial connection and provides the tools to handle additional network functionality that is available in the other FMAR packages.
  • Command Line Configuration: Optionally, if the application is launched from the command line, arguments can be passed in to default to a defined address/port. This functionality is limited in usefulness as command line arguments are only available for the Windows platform.
  • Client Network Transform: Surprisingly, Netcode for GameObjects does not provide this functionality by default. The Client Network Transform component allows a network object to be controlled with a specific client's local authority instead of being server authoritative. This is critical for AR/VR as the "source of truth" for the positional and rotational data of the trackers is coming from the user's local hardware, not a simulation running on the server as in most traditional game applications.
  • Network Variable Subscribe/Unsubscribe functionality: The NetworkVariableExtensionMethods class provides the ability for developers to watch a network variable for changes. Event subscription is a common pattern in Unity development, and allows for event based logic instead of constantly watching for changes in update.