Game Development Community

dev|Pro Game Development Curriculum

World Editor Asset Refresh/Reload Button

by Dante Falcone · 12/04/2008 (2:35 pm) · 1 comments

It is frustrating many times to have to reload the game mission every time you want to place a new object you exported from a 3d package, or whatever other asset you've made on the fly while running the game which you would instantly like to place in the world. This simple code addition adds a "Refresh" button to the Mission Editor, so that the current files are re-loaded.

WARNING: If you delete assets, their names will still show up in the Editor Creator until restarting the game.


In the file tools/missioneditor/gui/EditorGui.ed.gui
Place the below code next to one of the other GuiToggleButtonCtrl() objects. I put mine after the object that has its text = "Cntr".

new GuiToggleButtonCtrl() {
         profile = "GuiButtonProfile";
         horizSizing = "right";
         vertSizing = "bottom";
         position = "450 2";
         extent = "50 17";
         minExtent = "8 8";
         visible = "1";
         command = "loadDirectory(\"./\");";
         helpTag = "0";
         text = "Refresh";
         Tooltipprofile = "GuiToolTipProfile";
         tooltip = "Refresh all assets in editor";
         groupNum = "-1";
         buttonType = "PushButton";
      };

About the author

I am a Producer in the Video Game industry and specialize in MMO development, Character Art->Game pipelines, and general support programming.


#1
12/05/2008 (2:04 am)
Thank you, this I must try!!!

It's about as usefull as the invention of the cup - you don't think about its presence but you can't live without it ;-)