‚Äč
EdgeMultiplay.EdgeManager Class Reference

EdgeManager is the class responsible for Connection to the server, Handling Server Events and storing game session EdgeManager requires LocationService if you are using a MobiledgeX Server EdgeManager have many static variables, your app/game should have only one EdgeManager More...

Inheritance diagram for EdgeMultiplay.EdgeManager:

Public Member Functions

async Task ConnectToServer (bool useAnyCarrierNetwork=true, bool useFallBackLocation=false, string path="")
 Connect to your EdgeMultiplay server based on location and carrier info More...
 
void SendGamePlayEvent (GamePlayEvent gamePlayEvent)
 Not Recommended Send GamePlayEvent from your GameManager You can always send GamePlayEvent from your PlayerManager where most of your player logic should reside. More...
 

Static Public Member Functions

static NetworkedPlayer GetPlayer (string playerId)
 Get Player using the player id More...
 
static NetworkedPlayer GetPlayer (int playerIndex)
 Get Player using the player index in the room More...
 
static void JoinOrCreateRoom (string playerName, int playerAvatar, int maxPlayersPerRoom, Dictionary< string, string > playerTags=null)
 Sends Join Or Create Room request to the server, the server will try to match a player with any available room if the server didn't find an available room, the server will create a room for the player More...
 
static void GetRooms ()
 Sends a request to the server to get a full list of rooms on the servers More...
 
static void GetAvailableRooms ()
 Sends a request to the server to get a full list of rooms on the servers More...
 
static void CreateRoom (string playerName, int playerAvatar, int maxPlayersPerRoom, Dictionary< string, string > playerTags=null)
 Sends a request to the server to create a room More...
 
static void JoinRoom (string roomId, string playerName, int playerAvatar, Dictionary< string, string > playerTags=null)
 Sends a request to the server to join a room More...
 
static void SendUDPMessage (GamePlayEvent gameplayEvent)
 Sends a UDP Message from local player to other room members, can be used only after the game starts (OnGameStart()) More...
 
static void Disconnect ()
 Kill the connection to your EdgeMultiplay server More...
 
static void ExitRoom ()
 Exit the current room you are in. More...
 

Public Attributes

Transform WorldOriginTransform
 If you want to have a different World Origin, Players will be spawned relative to the Transform specified More...
 
List< NetworkedPlayerSpawnPrefabs
 List of GameObjects to be used as player avatar More...
 
List< PositionAndRotationEulersSpawnInfo
 List of Spawn Info, Spawn Info consists of Position and the Rotation Eulers More...
 
bool useLocalHostServer
 Set to true if you have EdgeMultiplay Server running on your machine More...
 
string hostIPAddress
 Use 127.0.0.1 as your IP Address for testing on you computer only Or use the Host IP Address for testing between your Computer and devices connected to the same WifiNetwork For Mac : Open Terminal and type "ifconfig" and copy the "en0" address For Windows : Open CMD and type "Ipconfig /all" and copy the "IPV4" address More...
 

Static Public Attributes

static MobiledgeXIntegration integration
 MobiledgeXIntegration is a responsible for locating and connecting the app to the server deployed on MobiledgeX More...
 
static Session gameSession
 The Game Session stored after the player is registered on the server More...
 
static List< NetworkedPlayercurrentRoomPlayers = new List<NetworkedPlayer>()
 list of the current players in the same room as the local player More...
 
static NetworkedPlayer MessageSender
 Represents the local player, to send messages to the server use EdgeManager.MessageSender.BroadcastMessage() More...
 
static NetworkedPlayer localPlayer
 Represents the local player, to send messages to the server use EdgeManager.MessageSender.BroadcastMessage() More...
 
static bool gameStarted
 Indicates that the game have already started More...
 
static List< EdgeMultiplayObserverobservers = new List<EdgeMultiplayObserver>()
 List of EdgeMultiplayObservers tracking and syncing Observables (Synced GameObjects) More...
 
const int defaultEdgeMultiplayServerUDPPort = 5000
 The Default UDP Port, you need to change the server port if you changed it here. UDP is used only for In-Room messages (GamePlayEvents) More...
 
const int defaultEdgeMultiplayServerTCPPort = 3000
 The Default TCP Port, you need to change the server port if you changed it here. TCP can be used for Game Flow Events and In-Room messages (GamePlayEvents) More...