Skip to main content


Variables can declared using the standard C# notation of type_name variableName (= initializing_expression)?

Just like C#, a variable's lifespan is the block it is declared in and its value is re-evaluated every frame.

Not initializing a variable will implicit assign it to default.

template VariableSample render {

float a = 10f;
float x;
Color r =;
var g =;



A state variable will be initialized once and then its value will be remembered every frame until its parent scope is destroyed.

template StateSample render {

state float a = 10f;
state float x;
state Color r =;
state var g =;