[Plugin] UIReloader, easy hot reloading for Programmed UI

Hello fellow UI programmers! I’ve got a nice little treat for you today!

Brief description:


Is a Plugin Designed to help you hot reload a script which creates UI (GUIs), for example, if you are creating your UI via Roact, or simply want to quickly test UI for a plugin.

and guess what!!!

You don’t need to go into Play Solo or anything of the sort :open_mouth:

Noice, how does this work though?

This plugin requires you to put all your UI scripts/folders under one main folder, which you will need to select before running the plugin. Once you run the plugin, it will make sure you have a folder selected, and then look for a script with the name “Main”. If all is good, it will take the source of said script and put it into a newly created ModuleScript, then run the module script.

Upon any change of the “Main” script’s source, the plugin will stop the old code from running and take the new code and run it.

Once the plugin is deactivated, the ModuleScript and the running code is then stopped and cleaned up!

Alright… cool, but how can I use this?

It’s actually really straight forward!!

  1. Put your UI scripts/folders under one main folder

  2. Name your primary script which executes the ui creation for you as “Main”

  3. Select the project folder you made

  4. Click the “UIReload” plugin button to run the plugin

  5. Click the “UIReload” plugin button again to deactivate the plugin

[NOTE]: any instances created by your code will need to manually be removed. (I will try to automate this in the future)

Nice, but hey! I heard a rumor that this plugin has a “unique” commands feature?

Oh, good question! it sure does!!!

In the command bar, type: print("UIReload: help") and a list of commands will display in the output!

You can run commands by printing out like i did above: print("UIReload: instructions") for an example is another command!

Another question… Do you plan on updating this in the future?

Actually, I have a lot of cool things planned, like:

  • Ability to detect if ANY type of script in the project folder is updated, and the hot reload will refresh for you!
  • Figure out to some how make an automated or semi-automated clean up system for Instances created via your code… (I have an idea of how but we’ll see…)
  • More commands!!!

Alright, last question… I found a bug, how can I tell you about it?

First, thank you for your help! I will try and make sure that the plugin is bug free but sometimes they slip by…

You can post ALL your bugs, comments, or suggestions here, I will be reading every reply

Thanks for taking time and reading my post, I hope you enjoy my plugin and find it helpful!!