Difference between ConsoleMethod and DefineEngineMethod?
by Jean-louis Amadi · in Torque 3D Professional · 04/14/2011 (5:44 am) · 5 replies
Hello, i wish to know what is the difference between ConsoleMethod and DefineEngineMethod? I'm not sure to understand but the both create a console access to referenced object in the engine i think.
About the author
www.gamealchemy.fr
#2
There's a bunch more to this but this is one of the reasons why using engineAPI is better.
04/14/2011 (6:24 am)
In short, ConsoleMethod/Function dumps all the internals of the interop on you. You need to handle all the string conversions, default args, prototype docstring construction, etc. yourself. engineAPI with its DefineEngineMethod/Function does that all for you.There's a bunch more to this but this is one of the reasons why using engineAPI is better.
#3
If you have hundreds of methods and if you need to port them to the new format,then this would be really bad for you.
04/14/2011 (6:55 am)
ConsoleMethod is good for backward compatibility.If you have hundreds of methods and if you need to port them to the new format,then this would be really bad for you.
#4
DefineEngineMethod: class must be have this function
04/14/2011 (7:19 am)
ConsoleMethod: you can define you function, this function is not in class.DefineEngineMethod: class must be have this function
#5
I have a small bunch of methods and with these details in mind i will port my code to DefineEngineMethod.
04/14/2011 (7:41 am)
Thank you very much all for all these details ;)I have a small bunch of methods and with these details in mind i will port my code to DefineEngineMethod.
Torque 3D Owner Matt Huston
Atomic Banzai Games