I'm facing a rather odd problem, I'm using unity 2017.3.1f1 Personal.
When I build the APK and I copy that file to the phone and install it from the phone's file manager, I can't switch from the main menu to the first scene, the game crashes at the load scene or just freezes after selection, thought it was due to the Async code so I tried without it and have no result at all.
When I select Build and Run this doesn't happen at all and the application runs normally, what I'm I missing here or how can I fix this? Already restarted unity and the computer many times.
Here's the code I'm using to switch in between scenes including the code without the Async mode:
public void Car1()
{
selectedCar = 0;
canvasManagerGO.GetComponent<CanvasManager>().Close();
SceneManager.LoadScene("W" + selectedWorld + "-L1", LoadSceneMode.Single);
}
public void Car2()
{
selectedCar = 1;
canvasManagerGO.GetComponent<CanvasManager>().Close();
SceneManager.LoadScene(1, LoadSceneMode.Single);
}
public void Car3()
{
selectedCar = 2;
canvasManagerGO.GetComponent<CanvasManager>().Close();
StartCoroutine(ChangeScene("W" + selectedWorld + "-L1"));
public IEnumerator ChangeScene(string sceneName)
{
loadingCanvas.SetActive(true);
AsyncOperation asyncOperation = SceneManager.LoadSceneAsync(sceneName, LoadSceneMode.Single);
while (!asyncOperation.isDone)
{
float progress = Mathf.Clamp01(asyncOperation.progress / .9f);
//Debug.Log(asyncOperation.progress);
slider.value = progress;
yield return null;
}
yield return null;
}
Car 1 and 2 have a direct mode without using the coroutine to change the scene and none of them work, the code has no errors at all or at least the console is not reporting anything, I also tried with different build settings and compressions, also with or without development build to check the profiler and nothing, thanks you all :)