This is how.
You are halfway through!Replace the line 504 in bl_LoginPro.csWithCode: Select all
using (UnityWebRequest w = UnityWebRequest.Get(bl_LoginProDataBase.Instance.GetUrl(bl_LoginProDataBase.URLType.Init))
Code: Select all
using (UnityWebRequest w = UnityWebRequest.Get(bl_LoginProDataBase.Instance.GetUrl(bl_LoginProDataBase.URLType.Init) + "?platform=" + Application.platform))
Now modify the provided PHP scripts accordingly.
Your former build v1.0 will remain functional as well as the updated v1.1, and the $GameVersion can be removed once you make sure all the players have updated their client to the new system. Or, you could just leave it.Append these lines to the top of bl_Common.php, either to the top of $GameVersion of below it. Doesn't matter.Code: Select all
$EditorGameVersion = "1.1"; $WindowsGameVersion = "1.1"; $MacOSGameVersion = "1.1"; $iOSGameVersion = "1.1"; $ANDROIDGameVersion = "1.1"; $LinuxGameVersion = "1.1"; $PS4GameVersion = "1.1"; $XBONEGameVersion = "1.1"; $GameVersion = "1.0";
You may customize it whichever way you want. Have fun and thanks Lovatto for this awesome template!Last but not least. Replace this line in bl_Init.phpWithCode: Select all
echo get_client_ip() . "|" . $GameVersion;
Code: Select all
/* Gets an Integer32 resembling the client's platform conforming to Unity's standards. // // Summary: // In the Unity editor on macOS. OSXEditor = 0, // // Summary: // In the player on macOS. OSXPlayer = 1, // // Summary: // In the player on Windows. WindowsPlayer = 2, // // Summary: // In the web player on macOS. OSXWebPlayer = 3, // // Summary: // In the Dashboard widget on macOS. OSXDashboardPlayer = 4, // // Summary: // In the web player on Windows. WindowsWebPlayer = 5, // // Summary: // In the Unity editor on Windows. WindowsEditor = 7, // // Summary: // In the player on the iPhone. IPhonePlayer = 8, PS3 = 9, XBOX360 = 10, // // Summary: // In the player on Android devices. Android = 11, NaCl = 12, // // Summary: // In the player on Linux. LinuxPlayer = 13, FlashPlayer = 15, // // Summary: // In the Unity editor on Linux. LinuxEditor = 16, // // Summary: // In the player on WebGL WebGLPlayer = 17, MetroPlayerX86 = 18, // // Summary: // In the player on Windows Store Apps when CPU architecture is X86. WSAPlayerX86 = 18, MetroPlayerX64 = 19, // // Summary: // In the player on Windows Store Apps when CPU architecture is X64. WSAPlayerX64 = 19, MetroPlayerARM = 20, // // Summary: // In the player on Windows Store Apps when CPU architecture is ARM. WSAPlayerARM = 20, WP8Player = 21, BB10Player = 22, BlackBerryPlayer = 22, TizenPlayer = 23, PSP2 = 24, // // Summary: // In the player on the Playstation 4. PS4 = 25, PSM = 26, // // Summary: // In the player on Xbox One. XboxOne = 27, SamsungTVPlayer = 28, WiiU = 30, // // Summary: // In the player on the Apple's tvOS. tvOS = 31, // // Summary: // In the player on Nintendo Switch. Switch = 32, Lumin = 33, // // Summary: // In the player on Stadia. Stadia = 34 */ $client_platform = strip_tags($_GET["platform"]); $ClientGameVersion = ""; if (isset($client_platform)) { if ($client_platform != "") { if ($client_platform == "OSXPlayer") $ClientGameVersion = $MacOSGameVersion; else if ($client_platform == "WindowsPlayer") $ClientGameVersion = $WindowsGameVersion; else if ($client_platform == "WindowsEditor") $ClientGameVersion = $EditorGameVersion; else if ($client_platform == "IPhonePlayer") $ClientGameVersion = $iOSGameVersion; else if ($client_platform == "Android") $ClientGameVersion = $ANDROIDGameVersion; else if ($client_platform == "LinuxPlayer") $ClientGameVersion = $LinuxGameVersion; else if ($client_platform == "PS4") $ClientGameVersion = $PS4GameVersion; else if ($client_platform == "XboxOne") $ClientGameVersion = $XBONEGameVersion; } else { $ClientGameVersion = $GameVersion; } } else { $ClientGameVersion = $GameVersion; } echo get_client_ip() . "|" . $ClientGameVersion;