Jump to content

How do you discover the current scene's type?


Recommended Posts

How do you programmatically find the type of scene that's currently active using plugin code? I'm aware of UnityEngine.SceneManagement.SceneManager.GetActiveScene().name and, in Flight scenes, it returns "pFlight4", which of course has "flight" as a substring. Is that the best we can expect? I was hoping to get back something like the enum KSPAddon.Startup, which is part of the class attribute for defining the type of scene in which the addon becomes active.

I'm just starting with this, so I'm probably missing something simple.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...