public void LoadCarGameScene() { //loads the scene with name Game SceneManager.LoadScene("GameScene"); //to reset the SessionPlay from the start SessionPlay sp = FindObjectOfType <SessionPlay>(); if (sp != null) { sp.RearrangeTheGame(); } }
Text carPlayerPoints; //updates the text of carPlayerPoints in UI void Start() { carPlayerPoints = GetComponent <Text>(); sessionPlay = FindObjectOfType <SessionPlay>(); }