InstanceSave
Last updated
Last updated
An InstanceSave represents an instance in Gum. InstanceSave only stores two pieces of information:
The name of the instance
The base type of the instance
All InstanceSaves in Gum will be contained in an ElementSave. Information about the InstanceSave's variables (such as its position or size) is not stored directly on the InstanceSave. The reason for this is because InstanceSaves have variables which depend on States. In other words, an InstanceSave may be at X=0 in one state, and at X=100 in another state.
Therefore, all variables values that define the InstanceSave are stored in states within the InstanceSave's container ElementSave.
In this pic the Screen1 ScreenSave has 3 InstanceSaves: 1. TextInstance 1. ColoredRectangleInstance 1. ColoredRectangleInstance1
The following code shows how to access the X value of an ElementSave as defined in the default state of its container.