Skip to content

The Unity 3d API for scene management is not perfect, it relies on names and paths at run-time yet provides no way to get information about the scenes that were added to the build settings. This project aims to alleviate that by automatically creating/updating an asset with this information when a build happens and also provides a easy way to ac…

License

Notifications You must be signed in to change notification settings

sindrijo/unity3d-runtime-buildscenes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

unity3d-runtime-buildscenes

Note: Unity 5.5 added SceneManager.GetSceneByBuildIndex(int index) though it can only return scenes that are actually loaded.

The Unity 3d API for scene management is not perfect, it relies on names and paths at run-time yet provides no way to get information about the scenes that were added to the build settings. This project aims to alleviate that by automatically creating/updating an asset with this information when a build happens and also provides a easy way to access the information at run-time in a build.

Example

BuildSceneRecord[] buildSettingsSceneRecords = BuildScenes.Records;
foreach(var buildSceneRecord in buildSettingsSceneRecords)
{
    Debug.Log(buildSceneRecord.BuildIndex);
    Debug.Log(buildSceneRecord.Name);
    Debug.Log(buildSceneRecord.Path);
    Debug.Log(buildSceneRecord.IsLoaded);
}

About

The Unity 3d API for scene management is not perfect, it relies on names and paths at run-time yet provides no way to get information about the scenes that were added to the build settings. This project aims to alleviate that by automatically creating/updating an asset with this information when a build happens and also provides a easy way to ac…

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages