My game works fine on my phone but when i ask people to download it and play it on their device it crashes. Im creating a track and field game. It used to crash on my phone as soon as i try to load an event or new scene, i didnt crash when i gave it time to load so i switch from using Application.LoadLevel to using SceneManager.LoadSceneAsync;
It only crashed once when i switched the way i loaded my scenes and i changed a few things in my code and scenes like, i removed unnecessary colliders. So other than that one crash it works perfectly fine on my phone, I started using Unity last October and this is the first game I practically completed so this is my only problem right now. I dont have a clue to why it crashes on other devices but mine.
As you, my game works perfect for the Unity or when I run on iOS Devices. In Android Devices always crash when I try to load a the scene. The last approximation I used was through Coroutines. It didn’t work. But, maybe some ideas can pop up. This is what I did:
public IEnumerator ChangeScene(string sceneName) {
Scene oldScene = SceneManager.GetActiveScene ();
Scene newScene = SceneManager.GetSceneByName (sceneName);
Camera oldMainCamera = Camera.main;
Camera.main.tag = "Untagged";
AsyncOperation asyncOperation = SceneManager.LoadSceneAsync (sceneName, LoadSceneMode.Additive);
while (!asyncOperation.isDone) {
if (asyncOperation.progress >= 0.9f) {
FindObjectOfType<AudioListener> ().enabled = false;
oldMainCamera.gameObject.SetActive (false);
foreach (var go in oldScene.GetRootGameObjects())
Destroy(go);
yield return null;
}
}
SceneManager.SetActiveScene (newScene);
}
hi;
whats the crash error ?
or any screen shot ?
What worked for me, for a similar problem, was turning off “Auto graphics API” under Android Player Settings > Other Settings, and then re-ordering the list of APIs so that OpenGLES2 is above OpenGLES3.