Desperately need some pointers on this code, in editor / on pc it is fine and works 100%
on device (oculus go) it basically ceases to work when it tries to access t.result
.
This is using the latest develop build.
public class BasicTest : MonoBehaviour
{
private ParseClient client;
public string txt;
public TMPro.TextMeshProUGUI output;
List<Cue> cues = new List<Cue>();
// Start is called before the first frame update
void Start()
{
#region Setup Client
client = new ParseClient(new ServerConnectionData
{
ApplicationID = "APPLICATIONID",//Real ones actually used
ServerURI = "https://parseapi.back4app.com/",
Key = "DOTNETKEY", //Real ones actually used
MasterKey = "MASTERKEY",//Real ones actually used
Headers = new Dictionary<string, string>
{
["X-Extra-Header"] = "Some Value"
}
},
new LateInitializedMutableServiceHub { },
new MetadataMutator
{
EnvironmentData = new EnvironmentData { OSVersion = SystemInfo.operatingSystem, Platform = $"Unity {Application.unityVersion} on {SystemInfo.operatingSystemFamily}", TimeZone = TimeZoneInfo.Local.StandardName },
HostManifestData = new HostManifestData { Name = Application.productName, Identifier = Application.productName, ShortVersion = Application.version, Version = Application.version }
},
new AbsoluteCacheLocationMutator
{
CustomAbsoluteCacheFilePath = $"{Application.persistentDataPath.Replace('/', Path.DirectorySeparatorChar)}{Path.DirectorySeparatorChar}Parse.cache"
}
);
client.Publicize();
Debug.Log("Client Created");
// client.SignUpAsync(username: "Lectio", password: "GeneralUser");
#endregion
ParseQuery<ParseObject> query =
client.GetQuery("Lectio");
Debug.Log("Query Created");
query.FindAsync().ContinueWith(t =>
{
Debug.Log("S1");
txt += "QueryRunning\n";
Debug.Log("S2");
if (!t.IsFaulted)
{
Debug.Log("S3");
txt += "QueryRunning2\n";
// txt += $"{t.Result.Count()} records rcd\n";
//for (int i = 0; i < t.Result.Count(); i++)
foreach (var v in t.Result)
{
Debug.Log("S4");
}
Debug.Log("S12");
}
Debug.Log("S13");
});
Debug.Log("S14");
}
// Update is called once per frame
void Update()
{
output.text = txt;
}
}