This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// GameCreate webhook | |
handlers.RoomCreated = function(args){ | |
/** Common/shared args between all the (6) webhooks **/ | |
var appId = args.AppId, | |
appVersion = args.AppVersion, | |
region = args.Region, | |
gameId = args.GameId, | |
type = args.Type, // type could be "Load" when rejoining or "Create" | |
actorNr = args.ActorNr, | |
/** Common/shared args between all the (6) webhooks **/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Put this in Global.asax.cs | |
// Do Not Allow URL to end in trailing slash | |
protected void Application_BeginRequest(object sender, EventArgs e) | |
{ | |
string url = HttpContext.Current.Request.Url.AbsolutePath; | |
if (string.IsNullOrEmpty(url)) | |
{ | |
return; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using UnityEngine; | |
using UnityEngine.Networking; | |
[DisallowMultipleComponent] | |
public class InternetWatchdog : MonoBehaviour | |
{ | |
[SerializeField] | |
private float CheckTimer = 60f; | |
private float timer; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// custom auth endpoint: https://{PlayFabTitleId}.playfablogic.com/webhook/1/prod/{PhotonSecretKey}/CustomAuth | |
// you can replace CustomAuth handler name and also in the URL | |
// C# client snippet: | |
// AuthenticationValues authValues = new AuthenticationValues(); | |
// authValues.AuthType = CustomAuthenticationType.Custom; | |
// Dictionary<string, object> data = new Dictionary<string, object>(6); | |
// data["UserId"] = userId; // PlayFabId | |
// data["AppId"] = appId; // Photon AppId | |
// data["AppVersion"] = appVersion // Photon AppVersion | |
// data["Ticket"] = ticket; // PlayFab auth session ticket |