UnityExplorer
UnityExplorer copied to clipboard
[Bug]: UnityExplorer is "destroyed" after selecting game from menu.
Are you on the latest version of UnityExplorer?
- [X] Yes, I'm on the latest version of UnityExplorer.
Which release are you using?
BepInEx 5.X Mono
Which game did this occur on?
Klonoa Phantasy Reverie Series
Describe the issue.
UnityExplorer works as intended on the main launcher screen, but upon selecting either of the two games, it will disappear until the game is closed fully and relaunched.
No further executables/dlls are present within the directory, so the games are in the main Assembly-CSharp.
Relevant log output
No response
I'm experiencing this issue as well. Same game. I tried increasing the startup delay time to 30 seconds but it didn't help.
I'm having the same issue, it seems to be caused by nsPFWLauncher.GameGlobal.GameSceneTransition deleting everything but a select few objects. I found out how to bypass it with a harmony patch, i just don't know how to distribute it.
@craftersshaft Why not post the code here?
just saw this, but here you go, requires making a quick harmony patch plugin, KlonoaExplorer is just the plugin with the logging functions added:
using HarmonyLib;
using KlonoaExplorer;
using nsPFWLauncher;
using System;
using UnityEngine;
using UnityEngine.SceneManagement;
namespace CustomCharacterLoader.Patches
{
[HarmonyPatch(typeof(GameGlobal), "GameSceneTransition")]
class GameGlobal_GameSceneTransition
{
static bool Prefix(GameGlobal __instance, ref GameGlobal.Game name, ref byte[] data, GameGlobal.Game ___nowScene, string[] ___sceneName)
{
Plugin.LogInfo("wahoo bad");
string[] array = new string[]
{
"SteamManager",
"SonyNPMain",
"SonyNpMain",
"PS5UDSManager",
"GlobalSaveDataManager",
"XboxSdk",
"ExplorerBehaviour",
"UniverseLibBehaviour",
"BepInEx_ThreadingHelper",
"BepInEx_Manager",
"UniverseLibCanvas"
};
___nowScene = name;
if (data != null)
{
int num = data.Length;
__instance.bSystemData = new byte[num];
Array.Copy(data, __instance.bSystemData, num);
}
foreach (GameObject gameObject in __instance.gameObject.scene.GetRootGameObjects())
{
if (gameObject != __instance.gameObject)
{
int num2 = 0;
while (num2 < array.Length && !gameObject.name.Contains(array[num2]))
{
num2++;
}
if (num2 == array.Length)
{
Plugin.LogInfo("Destroy Object : " + gameObject.name);
UnityEngine.Object.DestroyImmediate(gameObject);
}
}
}
SceneManager.LoadScene(___sceneName[(int)name]);
Resources.UnloadUnusedAssets();
return false;
}
}
}```
@craftersshaft Worked for me; thank you! Kind of weird how objects in the game are handled though; I can move something but it'll instantly move back. Maybe some of the game logic is implemented outside of Unity?
UEFix.zip Here's a DLL I built from (an adapted version of) the above code.
@flarn2006 kinda noob question, but what's the best way to install that dll or where do I put it? Having the same issue with klonoa but not really sure what to do to get it working
@TheDementedSalad: Put it in the same folder as the UnityExplorer DLL. (BepInEx\plugins)
@flarn2006 Nice on sai, worked a charm :) Maybe I'll actually be able to get IGT now