User Guide

Ruby Component
If you have multiple values you want to save and restore then the easiest way to deal with these is to put them in an Array and return that in
saveState. Let's say you have variables @x, @y, @name. Here's some example code that would save and restore these:
In loadState we use Rubys syntax for assigning variables to consecutive elements in an array.
@x, @y, @name = v is equivalent to: @x = v[0]; @y = v[1]; @name = v[2];
When using this method always make sure you maintain the same order for the variables in your loadState and saveState methods or you
might get some strange results.
114 of 212