GEMSocketListenerRunnable¶
Namespace: wevr.GEM.Runtime
Type: Class
Description¶
Runnable used by the Unity Server to receive data from GEM.
Nested Types¶
GEMPacketGEMPacketConverterGEMCoordinatesZoneViolationDataTerminateUserDataEmergencyPassthroughDataUpdateOffsetData
Properties¶
IsRunning¶
bool IsRunning { get; set; }
Events¶
ReceivedEmergency¶
event ReceivedEmergencyDelegate ReceivedEmergency
Invoked when GEM broadcasts an emergency.
ReceivedGhostUpdate¶
event GhostUpdateDelegate ReceivedGhostUpdate
Invoked when GEM broadcasts a player violating their zone.
ReceivedOffsetUpdate¶
event ReceivedOffsetUpdateDelegate ReceivedOffsetUpdate
Invoked when GEM broadcasts a new Offset.
ReceivedStartExperience¶
event Action ReceivedStartExperience
Invoked when GEM broadcasts to start the experience.
ReceivedTerminateExperience¶
event Action ReceivedTerminateExperience
Invoked when GEM broadcasts a player violating their zone.
ReceivedTerminateUser¶
event TerminateUserDelegate ReceivedTerminateUser
Invoked when GEM broadcasts to the server to terminate a user.
Methods¶
GEMSocketListenerRunnable¶
GEMSocketListenerRunnable(int port, bool autoStart=false)
GhostUpdateDelegate¶
delegate void GhostUpdateDelegate(int gemUserId, Vector2 location, int boundsState)
gemUserId
The GEM PlayerID who is violating the zone
location
The coordinates of the violating player at the current moment relative to the gem origin
boundsState
The type of zone violation that is occuring (out of zone, out of stage etc)
ReceivedEmergencyDelegate¶
delegate void ReceivedEmergencyDelegate(bool enablePassthrough, string message)
enablePassthrough
True if passthrough should be enabled
message
optional message from GEM regarding the emergency
ReceivedOffsetUpdateDelegate¶
delegate void ReceivedOffsetUpdateDelegate(Vector2 newOffset, bool absolute)
newOffset
The received offset coordinates
absolute
True if the coordinates are in absolute space
Start¶
void Start()
Starts the GEM Socket Listener.
Stop¶
void Stop()
Stops the GEM Socket Listener.
TerminateUserDelegate¶
delegate void TerminateUserDelegate(int gemUserId)
gemUserId
The GEM PlayerID who is violating the zone
Fields¶
listenSocket¶
TcpListener listenSocket
port¶
int port