Skip to content

Instantly share code, notes, and snippets.


AB Afif LukmanaAfif

View GitHub Profile
LukmanaAfif / AccelByteMatchmakingLogic.cs
Created Jan 8, 2021
AccelByte Sample Game Unity - Matchmaking Logic
View AccelByteMatchmakingLogic.cs
#region AccelByte MatchMaking Functions
/// <summary>
/// Find match function by calling lobby matchmaking
/// Get latencies from available game server regions from Quality of Service
/// Latencies can be used for matchmaking to determine which region has the lowest latency
/// </summary>
private void FindMatch()
if (connectToLocal)
LukmanaAfif / AccelByteAuthenticationLogic.cs
Created Jan 8, 2021
AccelByte Sample Game Unity - Auth Logic
View AccelByteAuthenticationLogic.cs
public void Start()
if (useSteam)
isUsingOtherPlatform = true;
loginType = E_LoginType.Steam;
Debug.Log("Valid ABUSER:"+abUser.Session.IsValid());
Debug.Log("Valid Steam Auth:" + steamAuth.isActiveAndEnabled);
LukmanaAfif / AccelByteChatLogic.cs
Created Jan 8, 2021
AccelByte Sample Game Unity - Lobby, Party, and Chat Logic
View AccelByteChatLogic.cs
#region AccelByte Chat Functions
public void SendChatMessage()
if (string.IsNullOrEmpty(UIHandlerLobbyComponent.messageInputField.text))
WriteWarningInChatBox("Please enter write your message");
else if (string.IsNullOrEmpty(activePlayerChatUserId))
WriteWarningInChatBox("Please select player or party to chat");
else if (!UIHandlerLobbyComponent.partyChatButton.interactable)
LukmanaAfif / AccelByteLeaderboardLogic.cs
Created May 18, 2020
AccelByte Leaderboard Logic Codes - Variables
View AccelByteLeaderboardLogic.cs
public class AccelByteLeaderboardLogic : MonoBehaviour
private GameObject UIHandler;
private UILeaderboardComponent UIHandlerLeaderboardComponent;
private UIElementHandler UIElementHandler;
private Leaderboard abLeaderboard;
private IDictionary<string, RankData> playerRankList;
private string lastPlayerRank;
LukmanaAfif / AccelbyteServerSDKConfig.json
Created Feb 5, 2020
Accelbyte Server SDK Config File
View AccelbyteServerSDKConfig.json
"PublisherNamespace": "accelbyte",
"Namespace": "lightfantastic",
"BaseUrl": "",
"DSMServerUrl": "",
"IamServerUrl": "",
"ClientId": "clientid",
"ClientSecret": "clientsecret",
"RedirectUri": "redirecturi"
View AccelbyteSDKConfig.json
"PublisherNamespace": "accelbyte",
"Namespace": "lightfantastic",
"UseSessionManagement": true,
"BaseUrl": "",
"LoginServerUrl": "",
"IamServerUrl": "",
"PlatformServerUrl": "",
"BasicServerUrl": "",
"LobbyServerUrl": "wss://",
View AccelByteAuthenticationLogic.cs
//Attempts to login with launcher
public void LoginWithLauncher()
// Check if auth code is available from launcher
string authCode = Environment.GetEnvironmentVariable(AUTHORIZATION_CODE_ENVIRONMENT_VARIABLE);
if (authCode != null)