CoreGui Viewer Plugin

Especially when working with plugins, being able to view the CoreGui is a wonderful ability to have. This use to be possible with XML hacks, but now it’s not, and even if it was, XML edits require you to use a custom launcher to prevent them from being overwritten whenever studio updates. To alleviate this, I made a plugin which lets you view/interact with the contents of the CoreGui.

< Link >


It’s not possible to edit the XML from a plugin, and XML edits don’t work for enabling the CoreGui even if it was possible to edit the Studio XMLs from a plugin, so how does it work? I create a mirror object which displays the contents of the CoreGui. The objects in the mirror are updated when the objects in the CoreGui are updated, so what you’re seeing in the mirror is a realtime duplicate of what is in the CoreGui. The mirror works both ways as well – if you change something in the mirror, the linked object in the CoreGui is updated as well. Effectively it’s the same thing as working directly with the CoreGui. Here’s a screenshot of the plugin in action:

I’ve colored the header of the settings menu yellow in the mirror, and it’s updated in the CoreGui as well. You still get the selection boxes over the GUIs you select too.

The mirror can be found below StarterPlayer and has the icon of a ScreenGui (because it is a ScreenGui). It is not in fact named “CoreGui” by the way – it’s named that but with a space in front of it, so it doesn’t interfere with plugins that access the CoreGui by game.CoreGui. If you look at the very bottom of the explorer, you’ll see the actual CoreGui that I force-enabled with XML edits (you can also see how it’s broken and doesn’t display its children even though it’s enabled). I had wanted the mirror to be located down there as well, but I couldn’t find a creatable object with an explorer order that low. Whatever happens, happens though – can’t have it all I guess.

I hope this is of some use to those of you who have since been left in the dark ever since the real CoreGui was broken. For those of you who can’t think of any reason you’d need to view the CoreGui, it’s use cases are really only plugin development related. Here’s a list of things I’ve used it for in the past:

  • Quickly find out how plugin/ROBLOX UI is structured
  • Get a copy of your plugin’s GUI without inserting your plugin as a model
  • Make quick modifications to items in the CoreGui on the fly to see how they look
  • Visually ascertaining the values of objects’ properties in the CoreGui
  • Delete stray GUI objects / 3D adornments which weren’t deleted properly by plugins (only other alternative is to reopen place)
9 Likes

Looks cool, but I think you can just run a simple command from the command bar to get this:

for i, v in ipairs(game.CoreGui:GetChildren()) do v.Archivable = true v.Parent = game.StarterGui end

For best results use this while playing (to get more gui).

2 Likes

That’s not automatic. I have to manually type that out in the command bar every time I want to even look at the CoreGui, and then I have to manually delete it from the StarterGui so it doesn’t get published alongside my game. Expanding the mirror this plugin creates is a lot less work. In addition to not being automatic, it’s not realtime. If the CoreGui changes and I want to see the change, I have to delete everything in the StarterGui and re-clone everything from the CoreGui. On top of both of those, changes to the StarterGui don’t affect items in the CoreGui. If I want to delete leftover SelectionBoxes a plugin didn’t clean up properly, I have to manually delete that through the command bar instead of deleting it from the explorer. This plugin was created because what you’ve suggested is too much of a hassle.

Is there a toggle button?

Toggle button as in a button to toggle whether or not it shows up in the explorer? No. If you’re not needing it enough that you want to have it closed at any point, you’re not really part of the plugin’s target audience. It takes up only one space in the explorer when collapsed, which is the same difference game:GetService(“Teams”) makes, and if you’d want to save space so small that’s probably a good sign you don’t work with the CoreGui enough to find this useful. A button for this would just be plugin button spam.