How to use "SaveIsEasyComponent"
In this article we will explain the functions of the component "SaveIsEasyComponent" found in the asset "Save Is Easy".
NOTE
You only need one "SaveIsEasyComponent" in the GameObject to save it.
The "SaveIsEasyComponent" is responsible for saving and loading all the values of the GameObject in which it is located, you also have event controls for that GameObject and some other options.
In this zone all the variables and properties that can be saved are shown, they are grouped, click on a text to show the internal fields, for example Transform. If any property or variable does not appear here, the asset has not been able to identify a way to save it.
Refresh will cause all the components to be analyzed again.
Reset will deselect everything marked in the tree and also deletes any other information of some other item saved in the past (only affects this GameObject).
In OnLoad, you will specify how the events are going to be handled when loading a game:
- CallStartAfterLoading: This will first load the GameObject information and then call the
Start()
. - CallStartBeforeLoading: This will cause the
Start()
to be called first and then the GameObject information will be loaded. - CallStartBeforeAndAfterLoading: This will cause the
Start()
to be called before and after the information is loaded. - Off: The asset is not going to call
Start()
, CallStart()
is slow, if it is not used it is recommended to put on Off.
- CallStartAfterLoading: This will first load the GameObject information and then call the
This indicates how the information of this GameObject will be loaded, there are two ways:
- Always present in the scene: In this way, when you want to load a scene, the asset will search all the loaded GameObjects for the corresponding ID and if it finds it, it will load all the corresponding information.
- Created at RunTime: The asset will ask the corresponding "SaveIsEasyManager" which is the prefab for the ID of the GameObject, and then it will create it in the scene and load all the corresponding information.
The Identifier(ID) is used by the asset to track each GameObject or prefab that exists to know who the information belongs to when loading the information. GameObjects Created at RunTime, they will all have the same ID, since they use it to locate their prefab.
This option is only for GameObject that are always in the scene, what it does is that during the loading of the object like "Always present in the scene" if it does not find the ID in the GameObjects loaded in the scene, it goes to create from the prefab of it.