I’ll post about the save and load with PlayMaker and Easy Save asset.

In particular, it is an active inactive loading method of an game object.

It took some time to apply it to the my project because it was hard to find explanations on the Internet.

1. Create a simple UI for inventory.

2. Disables objects in the inventory.

3.Add FSM. Whether to create a store manager FSM for the store or add a FSM for each button is a free choice

I made Press ShopItem01Button to disable ShopItem01Button and InvenItem01Button activate.

The name of the button has been changed to make it easier to understand. In the playmaker, the name of the game object should be designated so that it is easier to work with

This is an example of using ui button click on event.

It was applied to five items in the same way.

4. Create an empty object to create a Save Load FSM

I put the SaveALL event in the save position to receive the save event.

Put the set bool value action in Item01 to make it designated as True when the item is sold.

At the end, add “Send event by name” action

Event Target set Broadcast All

This saves the Boolean value.

Only bool values are stored, so you need to load the state of the object.

I separated the saveload fsm and the object load.

Use Bool Test Action

If the pool value is true, load the object state.

Disables the object created for loading the object

Turn on the object load after the entire save load

The test results are as follows

In Unity easy save, save stores variables such as int, float, and pool, so you have to change the state value of the game object by loading the saved variables.

Similar Posts