sinai-dev / UnityExplorer

An in-game UI for exploring, debugging and modifying IL2CPP and Mono Unity games.
GNU General Public License v3.0
2.29k stars 345 forks source link

[Other]: Keeping the UI how I have edited it? #100

Closed LoyalVR closed 2 years ago

LoyalVR commented 2 years ago

Describe the issue

Is there a way to keep the UI say if I've edited the UI and reload the game back up it puts everything back how I have put it or edited is there a featured this can do or is there another mod I can add to melonloader to do this?

sinai-dev commented 2 years ago

Currently there is no way to do this and I don't really plan on it sorry. UnityExplorer can help you in developing mods, but it won't develop the mod for you. It assumes you have a basic knowledge of how to make mods for Unity games.

The good news is that if you can do something with UnityExplorer, you can do the exact same thing through a C# mod. There are guides for making MelonLoader mods on their wiki, you can use that to get started.

For a quick example, let's say you have an object called SomeMenuObject, and it has a transform path of PlayerUI(Clone)/HealthBar. You could find this object from your mod by doing GameObject.Find("PlayerUI(Clone)/HealthBar/SomeMenuObject");, then a GetComponent<SomeClass>(); to get the component you want, and finally set the fields or properties on that class as desired. Good luck!