Welcome to the Digital Engineering Multiplayer framework.
This XRAI
submodule is intended to be used across various web and mixed reality multiplayer applications.
There are five directories and corresponding namespaces in this framework.
- Interactions
- React
- Scene
- Serval
- Utility
Interactions The interactions namespace holds scripts used to control the scene and gameobjects based on user input.
In general, if you need to interact with a gameobject, you should place the script in this directory.
Most of these interaction scripts have documentation inside of them. You may need to read this documentation. If something is missing, please contact Nathan Woodruff
.
- Camera Orbit - The camera orbits the origin of a scene
- Draggable - You can click and drag a gameobject in the scene
- Tooltip - When you hover your mouse over a gameobject, a custom tooltip is rendered
- TooltipManager - Used in conjunction with the Tooltip.cs script
- Highlight - This functionality is located elsewhere, in the
Serval
namespace
React The react namespace holds functions that React uses to talk to Unity. If you want to interact with a gameobject in Unity, but from React, place it here. You can expose them and React will be able to see the listeners in the DOM.
Read the docs for the library we use.
Scene The scene namespace holds all of the master/manager scripts for the build.
This is where we dynamically attach scripts to specific gameobjects at runtime, collect gameobjects intended for mapping into DeepLynx, and information about the scenes.
Serval The serval namespace is a framework on its own.
Serval has a master script called Handler.cs
. This is where Unity broadcasts and receives game state from Serval.
It has three sets of classes.
- Objects - Builds state information for gameobjects in the scene
- Players - Builds state information for players in the scene
- State - Helper classes used to craft object and player state.
Utility The utility namespace is used for high-level game functions.
It holds the CustomTags.cs
script, used to add tags to gameobjects in the scene. When a tag is added to a gameobject using this script, it is queried at runtime in the Scene
namespace, and Interactions
are added to it.