When i test a preview of the game in the Developer Console, the following error occurs in the browser. This occurs at the moment when it tries to request persistent data from the player. Someone knows what it is? NOTE* During development on Windows and in tests with Open Exported Port everything went well.
Complete log:
https://drive.google.com/open?id=1R4dJx4NSDDMbLirLENz_r0cgoedmS-tk
I would like to get the saved data from the main player with this code.
public void RequestPersistentData()
{
List<string> connectedUids = new List<string>();
connectedUids.Clear();
connectedUids.Add(AirConsole.instance.GetUID(AirConsole.instance.GetMasterControllerDeviceId()));
AirConsole.instance.RequestPersistentData(connectedUids);
}
First the scene is executed with AirInputManager.cs. Then the main menu scene where the MenuController script is executed is loaded (this is where the error happens). Finally, if the player finishes the game the data is stored on the champion screen where the ChampionManage.cs script runs.
More code: github
I solved it that way. In WebGL Player settings -> Publishing Settings-> Compression Format, change Gzip to Disabled. For some reason Gzip takes a long time to extract the necessary files when loading the game. And make sure that the name of the root folder where you will build the project has no blank space. "Crazy Game" (Bad). CrazyGame (Good).
To ensure it will work, make sure that the script execution order responsible for managing AirConsole runs at least -90 in Default Time. You can use the Script Execution Order settings (menu: Edit > Project Settings, then select the Script Execution Order__ category).