Search Unity

  1. If you have experience with import & exporting custom (.unitypackage) packages, please help complete a survey (open until May 15, 2024).
    Dismiss Notice
  2. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice

EditorApplication.currentScene obsolete?

Discussion in 'Scripting' started by Dymental, Dec 17, 2015.

  1. Dymental

    Dymental

    Joined:
    Sep 14, 2014
    Posts:
    29
    Unity tells me to use EditorSceneManager, but I can not find it at all, what is the correct use of it (and where does it hide)
    I need to get the name of the scene whether or not it is in the build settings.
     
  2. LeftyRighty

    LeftyRighty

    Joined:
    Nov 2, 2012
    Posts:
    5,148
  3. Dymental

    Dymental

    Joined:
    Sep 14, 2014
    Posts:
    29
    Cheer :)

    Correct syntax is then:
    Code (CSharp):
    1. currentScene = EditorSceneManager.GetActiveScene().name;
     
    afflower, wrstscrnnm6 and ageana like this.