sinai-dev / UniverseLib

A library for making plugins which target IL2CPP and Mono Unity games.
GNU Lesser General Public License v2.1
119 stars 51 forks source link

provide easy access for 3rd party plugins to UnityExplorer's Inspector #2

Closed Theadd closed 2 years ago

Theadd commented 2 years ago

Hey!

Allows other plugin developers that make use of UniverseLib to send any object/type to UnityExplorer's Inspector when the UnityExplorer plugin is also loaded.

I'm a mess naming things so feel free to rename/refactor it your way.

Thank you! You've got quite a pair in modding tools =)

sinai-dev commented 2 years ago

Thanks for the PR, and glad you like the tools.

Is there a particular reason you can't just reference UnityExplorer and call the Inspect method directly? I can see where you're coming from with this, but it does feel a little strange putting something this specific to UnityExplorer inside this lib. Is it just that there's no NuGet package for UE? Or did you want to avoid referencing it for some reason?

Theadd commented 2 years ago

Is it just that there's no NuGet package for UE? Or did you want to avoid referencing it for some reason?

It's only been a few months that I began toying around with C#/BepInEx/Unity-modding and actually, I haven't used NuGet much so far.

I'm probably getting it wrong, but, are you suggesting that by adding UnityExplorer as a reference I can somehow access to the types/members in UnityExplorer when the user has it installed under BepInEx/plugins and don't get an exception just after launching the game for those users that doesn't have UnityExplorer installed?

Including the UnityExplorer tool itself in another tool doesn't seem right at all.

Well, I've the code already so I'll put it somewhere else! =)

Thanks anyway!

sinai-dev commented 2 years ago

I'm probably getting it wrong, but, are you suggesting that by adding UnityExplorer as a reference I can somehow access to the types/members in UnityExplorer when the user has it installed under BepInEx/plugins and don't get an exception just after launching the game for those users that doesn't have UnityExplorer installed?

That would be correct yeah, if any of the types which reference UnityExplorer were accessed. I'm just curious, you want to be able to inspect things in UnityExplorer from your mod, but you can't guarantee UnityExplorer would be loaded? Just seems like an unusual situation but I guess that's fair enough.

Thanks for the PR anyway, I'll think about it some more and I might add it, but yeah no harm in just putting the code in your own mod for now I guess.