In general, the situation is this. There is a MainMenu script, hung on MainCamera .
using UnityEngine; using UnityEngineInternal; using System.Collections; using UnityEngine.UI; using System; public class MainMenu : MonoBehaviour { public GameObject canvas; public GameObject background; public GameObject button; GameObject panelMainMenu; void Start() { panelMainMenu = Instantiate(canvas) as GameObject; GameObject background = CreateBackground(0,0,1920,1080,panelMainMenu) as GameObject; } public GameObject CreateBackground(float posX, float posY, float sizeX, float sizeY, GameObject parent) { GameObject back = Instantiate(background, Vector3.zero, Quaternion.identity) as GameObject; back.transform.SetParent(parent.transform); back.transform.localScale = new Vector3(sizeX, sizeY, 1); back.transform.localPosition = new Vector3(posX, posY, 0); return back; } } canvas, background, button - standard UI elements attached through the inspector. After the scene starts, a furious memory zhory with the Unity application begins, as a result of which, if you do not have time to close the process, the entire system is put. What could be the reason? In the scene there are only MainCamera and EventSystem .