almost done, just interactive unity structs and a few minor things to finish off.

This commit is contained in:
sinaioutlander
2020-11-16 21:21:04 +11:00
parent 4a1125cf1d
commit 91d5fc284f
26 changed files with 1020 additions and 232 deletions

View File

@ -11,26 +11,26 @@ namespace UnityExplorer.Unstrip
#if MONO
public static GameObject[] GetRootGameObjects(Scene scene) => scene.GetRootGameObjects();
public static GameObject[] GetRootGameObjects(int handle)
{
Scene scene = default;
if (handle == SceneExplorer.DontDestroyHandle)
scene = SceneExplorer.DontDestroyObject.scene;
else
{
for (int i = 0; i < SceneManager.sceneCount; i++)
{
var iscene = SceneManager.GetSceneAt(i);
if (iscene.handle == handle)
scene = iscene;
}
}
//public static GameObject[] GetRootGameObjects(int handle)
//{
// Scene scene = default;
// if (handle == SceneExplorer.DontDestroyHandle)
// scene = SceneExplorer.DontDestroyObject.scene;
// else
// {
// for (int i = 0; i < SceneManager.sceneCount; i++)
// {
// var iscene = SceneManager.GetSceneAt(i);
// if (iscene.handle == handle)
// scene = iscene;
// }
// }
if (scene != default && scene.handle != -1)
return scene.GetRootGameObjects();
// if (scene != default && scene.handle != -1)
// return scene.GetRootGameObjects();
return new GameObject[0];
}
// return new GameObject[0];
//}
#endif
#if CPP