1.4.7533
oct - Sleep() optimizations and Variables editor
Sleep() rework
Awaiting for something is a mandatory part of any automation. EyeAuras constantly does that - timeouts between keypresses, ensuring that capture FPS is consistent, user-driven timeouts in scripts. Default instruments provided by operating system and default methods (like Thread.Sleep, Task.Delay and few others) are not accurate enough, so at some point I had to implement a combination of methods which ensured better accuracy.
This mechanism allowed sub-millisecond awaits and worked for the last 5-6 months. Unfortunately, accuracy comes with a cost and for most operations it not really needed.
That is why for the next few months we'll be trying a 3rd version of Sleep(), which is expected to meet middle-ground between accuracy and performance cost. On average, it is expected that it will reach accuracy of up 0.5 - 5ms.
This means that if you are setting EA to wait for 1ms, the effective wait time will be in range 1 - 1.5ms, which is more than enough for most use cases. For larger timeouts, such as 100ms, it may vary in range of 100 - 105ms.
To counterweight loss of accuracy, you'll get much better performance. We'll see how it goes in real world scenarios. As a part of development for this feature, I've added integration layer which will allow you to use whatever Sleep() mechanism you see fit for your scenarios. Will post information on this later.
Variables editor rework
- Editor is now the same for Blackboard and Variables
- It is now possible to edit values directly (not all of them, only primitive ones for starters)
- You can now add new variables - should make things a bit easier to setup
- Prepared the mechanism which will generated boiler-plate code for C# scripts and will automatically generated Properties which would allow you to get/set. Will be published a bit later.

Bugfixes/Improvements
Made is to IsMaximized in ExecuteScriptNode is stored in the node itself
- [BehaviorTrees] ExecuteScript node now remembers whether it was Maximized or not
- [Scripting] Added
Listen()toScriptVariable- you can now use it instead ofWatchCurrentValue - [Scripting] Fixed a problem with folders not being found via relative path in some cases
- [Scripting] Fixed a problem with code rewriter in some cases generating uncompilable code