Creating variable assets is straight forward and can be done in 2 easy steps. First right-click inside your content browser and go to OutOfTheBox -> Variable.
Second, choose from the list the type of data you want to store. For now please stick with Global variables, we will cover the Instanced (Local) ones later on in this document.
A new asset is now created, you can set a name for it and can start our work!
Inside the variable asset you will find the following:
Now that we have every set up we can start working with our newly created asset. The most two important possible operations are Read/Get and Write/Set.
We will start now with Getting the value of our variable. This can be done multiple ways. The easiest way and our recommendation is to use the GetGenericVariable node.
This custom node, lets you choose any of the variables you already created and will then change the output pin according to the type of the variable. This is incredibly helpful and saves a lot of extra work.
If you prefer, you also have the option to use the appropriate getter for your type. For example if you created a GenericFloatVariable you can use the GetGlobalFloatValue (old: GetGlobalFloatVariableValue) and select your asset from a shorter list. However we still recommand use the Generic approach.