A little bit of work on Inspectors, fixed a few issues in Mono/BepInEx builds

This commit is contained in:
sinaioutlander
2020-10-28 20:52:40 +11:00
parent b61ac481b9
commit b5b3e90b09
19 changed files with 222 additions and 206 deletions

View File

@ -1,5 +1,6 @@
using System;
using ExplorerBeta.Helpers;
using UnityEngine;
#if CPP
using UnhollowerBaseLib;
#endif

View File

@ -1,6 +1,6 @@
#if CPP
using System;
using System;
using ExplorerBeta.Helpers;
using ExplorerBeta.UI.Main;
using UnityEngine;
using UnityEngine.SceneManagement;
@ -8,8 +8,22 @@ namespace ExplorerBeta.Unstrip.Scenes
{
public class SceneUnstrip
{
public static GameObject[] GetRootGameObjects(Scene scene) => scene.GetRootGameObjects();
public static GameObject[] GetRootGameObjects(int handle)
{
for (int i = 0; i < SceneManager.sceneCount; i++)
{
var scene = SceneManager.GetSceneAt(i);
if (scene.handle == handle)
return scene.GetRootGameObjects();
}
return new GameObject[0];
}
//Scene.GetRootGameObjects();
#if CPP
internal delegate void d_GetRootGameObjects(int handle, IntPtr list);
public static GameObject[] GetRootGameObjects(Scene scene) => GetRootGameObjects(scene.handle);
@ -41,6 +55,6 @@ namespace ExplorerBeta.Unstrip.Scenes
GetRootCountInternal_delegate iCall = ICallHelper.GetICall<GetRootCountInternal_delegate>("UnityEngine.SceneManagement.Scene::GetRootCountInternal");
return iCall.Invoke(handle);
}
#endif
}
}
#endif
}