GameLiftManager Class |
Namespace: ASL
The GameLiftManager type exposes the following members.
Name | Description | |
---|---|---|
GameLiftManager | ||
GameLiftManager | Initializes a new instance of the GameLiftManager class |
Name | Description | |
---|---|---|
m_Client |
The AWS client variable that allows a connection to and the ability to communicate with GameLift
| |
m_GameSessionName |
The name of the game session the user is currently in
| |
m_GroupId |
The group ID used to communicate with all users
| |
m_NullCallbackIdInString | A value for callback id in string format when the given null as callback. | |
m_Packet | ||
m_PeerId |
This current user's peerId
| |
m_ServerId |
The id of the server, used to send messages to the server
| |
m_Username |
This current user's username
|
Name | Description | |
---|---|---|
AddPlayerToList |
Adds a player to the player list for this session
| |
AddPlayerToLobbyUI | ||
AllPlayersReady | ||
AmHighestPeer |
Returns true if the caller is the highest peer id user in the match. This is a good way to assign a "Host" player if desired.
Though do keep in mind that ASL is a P2P network.
| |
AmLowestPeer |
Returns true if the caller is the lowest peer id user in the match. This is a good way to assign a "Host" player if desired.
Though do keep in mind that ASL is a P2P network.
| |
AnchorIDUpdate | ||
Awake |
The Awake function, called right after object creation. Used to communicate that this object should not be destroyed between scene loads
| |
Claim | ||
ClaimFromPlayer | ||
CombineByteArrays |
Combines byte arrays so they can be sent as one byte array to other users. Can be called with 2 or more byte[] arguments.
Note that this method supports a variable number of arguments.
| |
CombineByteArrayWithoutLengths |
Combines byte arrays so they can be sent as one byte array to other users
| |
ConvertBoolToByteArray |
Converts a bool into a byte array
| |
ConvertColorArrayToFloatArray |
Converts a Color array into a float array
| |
ConvertFloatArrayToByteArray |
Converts a float array into a byte array
| |
ConvertFloatArrayToColorArray |
Converts a float array into a Color array
| |
ConvertFloatArrayToVector3Array |
Converts a float array into a Vector3 array
| |
ConvertIntToByteArray |
Converts an int into a byte array
| |
ConvertVector3ArrayToFloatArray |
Converts a vector3 array into a float array
| |
ConvertVector3ToByteArray |
Converts a vector3 variable into a byte array
| |
ConvertVector4ToByteArray |
Converts a Vector4 variable into a byte array
| |
CreateRTMessage |
Creates an RealTime message to be sent to other users
| |
DeleteObject | ||
DestroyLobbyManager |
Destroys the LobbyManager internal class to free up space after a game is started
| |
DisconnectFromServer |
Disconnects the user from the GameLift servers if they are connected
| |
DoOpFunctionCallback(String) |
Gets the corresponding callback without parameter function with the given OpCode and callback id from the dictionary.
Removes the callback function after it has been invoked.
| |
DoOpFunctionCallback(String, GameObject) |
Gets the corresponding callback function with the given OpCode and callback id from the dictionary.
Removes the callback function after it has been invoked.
| |
GenerateOpFunctionCallbackKey |
Generates a unique callback id for a callback function.
| |
GetHighestPeerId | Returns the current highest peerID value out of all the currently connected players | |
GetInstance |
Used to get the Singleton instance of the GameLiftManager class
| |
GetLowestPeerId | Returns the current lowest peerID value out of all the currently connected players | |
IncrementLocalPosition | ||
IncrementLocalRotation | ||
IncrementLocalScale | ||
IncrementWorldPosition | ||
IncrementWorldRotation | ||
IncrementWorldScale | ||
KeepConnectionAlive |
Sends an empty packet to the server to help maintain the android socket
| |
LaunchScene | ||
LoadScene | ||
LobbyTextMessage | ||
OnApplicationPause |
Used to make sure Android devices can disconnect from the GameLift servers. This function will quit the application when it loses focus
e.g., when you exit the app to the home screen. Doing so is a good thing and prevents hanging connections.
| |
OnApplicationQuit |
Called when an application quits, ensuring the user cleanly exits the GameLift server
| |
OnCloseEvent |
An AWS listener function that is called when a connection is ended with GameLift
| |
OnConnectionErrorEvent |
An AWS listener function that is called when there is a connection error event
| |
OnDataReceived |
An AWS listener function that gets called every time a packet is received.
Directly invokes the OpCode function corresponding to the OpCode number, determined by the OpCode enum.
| |
OnOpenEvent |
An AWS listener function that is called when a connection is opened
| |
PlayerDisconnected | ||
PlayerDisconnectedBeforeMatchStart | ||
PlayerJoinedMatch | ||
QForMainThread(Action) |
Queue a function to be called on the Unity thread that contains no parameters
| |
QForMainThreadT1(ActionT1, T1) |
Queue a function to be called on the Unity thread that contains 1 parameter
| |
QForMainThreadT1, T2(ActionT1, T2, T1, T2) |
Queue a function to be called on the Unity thread that contains 2 parameters
| |
QForMainThreadT1, T2, T3(ActionT1, T2, T3, T1, T2, T3) |
Queue a function to be called on the Unity thread that contains 3 parameters
| |
QForMainThreadT1, T2, T3, T4(ActionT1, T2, T3, T4, T1, T2, T3, T4) |
Queue a function to be called on the Unity thread that contains 4 parameters
| |
QForMainThreadT1, T2, T3, T4, T5(ActionT1, T2, T3, T4, T5, T1, T2, T3, T4, T5) |
Queue a function to be called on the Unity thread that contains 5 parameters
| |
QForMainThreadT1, T2, T3, T4, T5, T6(ActionT1, T2, T3, T4, T5, T6, T1, T2, T3, T4, T5, T6) |
Queue a function to be called on the Unity thread that contains 6 parameters
| |
RejectClaim | ||
ReleaseClaimToPlayer | ||
RemoveOpFunctionCallbackByCallbackId |
Removes the corresponding callback function by the given callback id from the dictionary.
| |
RemoveOpFunctionCallbackNoParamByCallbackId |
Removes the corresponding callback function without parameter by the given callback id from the dictionary.
| |
RemovePlayerFromList |
Removes a player from the player list for this session. Happens when a player disconnects.
It calls reassign function to reassign the physics master for the game if the leaving player was the master.
| |
ResolveAnchorId | ||
ResolvedCloudAnchor | ||
RunMainThreadQueueActions |
Locks and executes any functions that have been added to the QForMainThread queue. Is continuously called from this class's Update function
| |
SendARPlaneAsMesh | ||
SendFloats | ||
SendTexture2D | ||
ServerSetId | ||
SetLocalPosition | ||
SetLocalRotation | ||
SetLocalScale | ||
SetObjectColor | ||
SetOpFunctionCallback(GameLiftManagerOpFunctionCallback) |
Generate callback id with given information.
save the callback with generated id as the key into dictionary
| |
SetOpFunctionCallback(GameLiftManagerOpFunctionCallbackNoParam) |
Generate callback id with given information.
save the callback with generated id as the key into dictionary
| |
SetOpFunctionCallback(GameLiftManagerOpFunctionCallback, String) |
Adds the given callback function with the given OpCode as the key into the dictionary
| |
SetOpFunctionCallback(GameLiftManagerOpFunctionCallbackNoParam, String) |
Adds the given callback function without parameter with the given OpCode as the key into the dictionary
| |
SetOpFunctionCallbackString(GameLiftManagerOpFunctionCallback) |
Generate callback id with given information.
save the callback with generated id as the key into dictionary
| |
SetOpFunctionCallbackString(GameLiftManagerOpFunctionCallbackNoParam) |
Generate callback id with given information.
save the callback with generated id as the key into dictionary
| |
SetPhysicsMasterId |
Assigns the given peer id to physics master's id.
| |
SetWorldPosition | ||
SetWorldRotation | ||
SetWorldScale | ||
SpawnPrefab | ||
SpawnPrimitive | ||
SpiltByteArray |
Splits up a single byte array, returning only the section requested
| |
Start |
The start function called upon object creation but after Awake, used to initialize internal classes and setup the singleton for this class
| |
StartPacketStream |
Starts the coroutine that will send an empty packet to the relay server every second to help maintain the Android connection
| |
TagUpdate | ||
Update |
Update is called once per frame and in this case is used to ensure any function triggered by AWS is ran by the main Unity thread
|
Name | Description | |
---|---|---|
m_callbackIdIndex | The index value for callback id in data payload. | |
m_GameController |
Internal class used to decoded packets received from the AWS
| |
m_Instance |
The singleton instance for this class
| |
m_LobbyManager |
Internal class used to setup and connect users to each other
| |
m_MainThreadQueue |
The queue that will hold all of the functions to be triggered by AWS events
| |
m_NullCallbackId | A value for callback id when the given null as callback. | |
m_PhysicsMasterId |
The peer id of the current selected physics master
| |
m_Players |
Dictionary containing the all users that are connected peerIds and usernames
| |
m_SceneLoader |
Internal class used to load scenes for all users
| |
m_StreamActive |
Flag indicating whether or not we have activated the KeepConnectionAlive() coroutine so it doesn't get activated more than once
| |
OpCodeFunctions |
Array of OpCode function references executed when a packet is received with the corresponding OpCode.
null entries in the array are OpCodes that currently have no action within this script when received,
but may have other action elsewhere or are automatically sent.
| |
OpFunctionCallbacks |
Dictionary containing the all callbacks that are connected OpFunction's OpCode
| |
OpFunctionCallbacksNoParam |
Dictionary containing the all callbacks without parameter that are connected OpFunction's OpCode
|