I have been working for building a tool under iOS to get whole GameObject tree(including Scene).
I have already learned out that I could create a pseudo object, just let MainCamera mount it, and inside the pseudo object I could just setup a RPC server and let the object do the rest work.
However, I think the way above is too complicated and needs to be integrated by the original game project manually. So I’m looking for a way without involving the game project.
I once thought using UnityFramework could help, but there were no helpful things(including unity_send_message).
“dump” means get the whole GameObject or Scene hierachy and those objects’ information such as tag, name, text, rect
“networking” is just a cross framework communicating method to deliver information above from inside unity to native, it’s okay to use other mechanisms.
Every GameObject has a Transform component that contains a list of its children. Recursively traverse it and and you can get all the MonoBehaviors on each one and print their types, etc. Reading it all out is trivial, reconstructing it all again not so much.
Yes, you are right. I have already implemented this, but I’m trying to find a way to do this in a released app instead of integrating those code to source code.
I don’t think the OP is looking for this. It sounds like he is talking about hacking someone else’s game to get this information.
The answer is there is no built in way to take someone else’s released game and without access to the source code to be able to iterate through the hierarchy. I would assume it is possible if you developed your own system for examining the game’s memory footprint, and figuring out how to identify everything you’re looking for in memory. But if you had the skills needed to pull that off, you wouldn’t be asking the question here anyways. So the answer is no.
Oh Uncle Joe, I think you nailed it. I didn’t notice that ‘original game project’ wording.
Good luck OP! Check the modding forums. There are definitely a lot of tools out there for hacking and modding Unity games. This forum is for people using Unity as a product.