1) The events, Key Pressed, Button Clicked, etc, all say to only register for the event when it is needed, due to network traffic.
Does this mean you should use the event in the trigger if you really need it, or that you should have as many conditions as possible with the event. Does it still generate traffic if the condition fails? Does having a condition to narrow down the number of calls make any difference in terms of performance?
2) Is there any difference in terms of performance when using custom script versus UI?
1) The event is where it's slowing down. Doesn't matter how many conditions or actions you have linked to that, the events are always called when you press a key. So you should only create a Key Press event when you do need it.
2) Well, GUI is actually custom script with a nice painting. If you know your scripting and know how to code efficiently then your custom script will perform better than GUI ever can. The difference isn't so great, however.
1) The events, Key Pressed, Button Clicked, etc, all say to only register for the event when it is needed, due to network traffic.
Does this mean you should use the event in the trigger if you really need it, or that you should have as many conditions as possible with the event. Does it still generate traffic if the condition fails? Does having a condition to narrow down the number of calls make any difference in terms of performance?
2) Is there any difference in terms of performance when using custom script versus UI?
1) The event is where it's slowing down. Doesn't matter how many conditions or actions you have linked to that, the events are always called when you press a key. So you should only create a Key Press event when you do need it.
2) Well, GUI is actually custom script with a nice painting. If you know your scripting and know how to code efficiently then your custom script will perform better than GUI ever can. The difference isn't so great, however.
@s3rius:
I know how to code efficiently in general, as well as the syntax for the particular language in the editor. I just don't have any API calls memorized.