This is useful for separating globally-unlocked features from playthrough-specific game data.įirst, use the Create Save Game Object node to create an object based on your SaveGame class. Make sure you set the Save Game Class input pin's dropdown to the class you've created, which is MySaveGame in this example. The Create Save Game Object node will automatically change its output pin type to match the type you specify with the Save Game Class input pin. This enables you to use it directly, without a Cast To node. You may want to save the resulting object to a variable by using Promote to Variable so that you can easily reuse the object you just created later on. Now that the Save Game Instance holds your custom SaveGame object, you can send information to it. For example, you can set the Player Name field to "PlayerOne". ![]() Continue to set fields in your SaveGame object until it contains all of the data you want to store in the saved game file. ![]() When the SaveGame object is fully populated, use the ASync Save Game To Slot node to finish saving the game. You will also need to provide a file name and a user ID. The file name and user ID in this example will be the default values created earlier. Execution will continue from the top pin immediately, and from the second pin once the savegame operation is complete. ![]() The output pins will not be valid until the second pin has executed.įirst, call CreateSaveGameObject (from the UGameplayStatics library) to get a new UMySaveGame object.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |