Search Unity

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;
     
    wrstscrnnm6 and hexaust like this.