Search Unity

  1. How can our website serve you better? Give us your feedback. Take our survey and let us know.
    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.
unityunity