Unity Error CS0234: SceneMangement
I imported a new standard assets for my 2D Platformer but I got this error :
Assets/Standard Assets/2D/Scripts/Restarter.cs(3,19): error CS0234: The type or namespace name SceneManagement' does not exist in the namespace
UnityEngine'. Are you missing an assembly reference?
The Codes :
using System; using UnityEngine; using UnityEngine.SceneManagement;
namespace UnityStandardAssets._2D { public class Restarter : MonoBehaviour { private void OnTriggerEnter2D(Collider2D other) { if (other.tag == "Player") { SceneManager.LoadScene(SceneManager.GetSceneAt(0).path); } } } }
Asset Link : https://www.assetstore.unity3d.com/en/#!/content/32351
Current Unity Version : 5.0.0f4
Answer by mikelortega · Apr 06, 2016 at 10:43 AM
SceneManagement is only available in Unity 5.3 and above. In version 5.0.0f4 there is no SceneManagement, you have to use Application.LoadLevel (obsolete in current version).
Your answer
Follow this Question
Related Questions
Iterator error upon trying to load scene 0 Answers
`SceneManager' does not contain a definition for `LoadScene' 1 Answer
Error CS1525 0 Answers