Trying to make a game on Android, when I click on a button to switch to another scene, it gives an error:

Scene '0211651' couldn’t be loaded. UnityEngine.Application: LoadLevel (String) Buttons: OnMouseUpAsButton () (at Assets / Scripts / Buttons.cs: 11) UnityEngine.SendMouseEvents: DoSendMouseEvents ( Int32)

Code to go (C #):

using UnityEngine; using System.Collections; public class Buttons : MonoBehaviour { private void OnMouseUpAsButton() { switch (gameObject.name) { case "Play": Application.LoadLevel("0211651"); break; } } } 

Could this be due to the fact that the scenes were made not in one project, but in two, and then imported from one to another?

    1 answer 1

    Perhaps the problem is that you did not add the scene to the assembly. To do this you need to put a tick in front of the desired scene in the Build Settings