Gui and Scripts
by elvince · in Torque 3D Professional · 06/21/2009 (11:29 am) · 3 replies
All,
When inspecting the different scripts & gui in the "New project" I made, I see that Gui files can contains script and other have a separate files.
More some have the cs file in the same folder and other are in another folder hierachy.
I know that all those item are working but is there a "best pratices" to organize those stuffs? Are there performance enhancement by doing the things in one way or another?
Thanks,
When inspecting the different scripts & gui in the "New project" I made, I see that Gui files can contains script and other have a separate files.
More some have the cs file in the same folder and other are in another folder hierachy.
I know that all those item are working but is there a "best pratices" to organize those stuffs? Are there performance enhancement by doing the things in one way or another?
Thanks,
About the author
Recent Threads
#2
Redefining a function is okay for Torque, redefining an object isn't.
//Edit: Plus you don't want your objects being stomped when re-exec()'ing.
06/22/2009 (6:49 am)
One little thing, though, that speaks for separating the GUI save files from the GUI logic is that when you re-exec() the logic from within a running engine for your modifications to take effect, you won't run into trouble with a whole host of definitions being rejected for rebinding to already defined names.Redefining a function is okay for Torque, redefining an object isn't.
//Edit: Plus you don't want your objects being stomped when re-exec()'ing.
#3
06/22/2009 (12:09 pm)
So true, I forgot about that aspect of it.
Associate Michael Hall
Distracted...
For the most part it's a design choice of your own. So long as both sets get exec'd and things are in the proper order you'll be fine.