-
Notifications
You must be signed in to change notification settings - Fork 4
Live Reload
YUI supports Live Reload, which means that you can edit the files for the UI while the game is running, and then you can press F5 when in the game to reload the UI from the files on disk.
Once you try it, you'll quickly see how much time this saves you! Though it can be a little difficult at first to remember that you don't have to quit the game before making changes!
Note: YUI won't restart the game, reload the room, reset your game data, or anything like that. Only the UI will be updated!
YUI needs to know where you source data files live, in your actual GMS2 project folder. The game doesn't have access to this at runtime, so you have to do a one time configuration per project.
-
Find the
__YuiConfiguration__
file in GameMaker, under theConfigure Me! - YUI
folder in the asset browser. This is automatically added when you import the YUI package -
Edit the first
#macro
definition by replacingundefined
with the FULL path to the datafiles folder.
For example, on my computer, the data files for the Example Project are located atD:/Projects/Game Design/YUI/datafiles/
, so I would set the macro to"D:/Projects/Game Design/YUI/datafiles/"
. -
Disable the File System Sandbox in the GameMaker Options for your project.
Note: This is required as YUI will load the .yui files directly from their location in the /datafiles folder of your project source directory
That's it!
If you clone the Example Project and run it, there will be a message at the bottom of the window that tells you whether Live Reload is configured correctly. You can use this to make sure you're doing the above steps correctly before trying it in your own project.
Home - Elements - Built-in Widgets - YuiScript - Themes -- Custom Widgets