LoginSignup
13
12

More than 5 years have passed since last update.

[Unity] 現在のシーン名を取得

Posted at

Application.loadedLevelName で取得できます.

Debug.Log(Application.loadedLevelName);

特定のシーンのときのみ何かしたいときは

if (Application.loadedLevelName == "HogeScene") {
    // TODO: 
}

って感じでいけます.

13
12
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
13
12