inkle / inkle/ink

Maintaining Ink story state across Unity scenes

Open
#272 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
4.9k
Forks
540
PR merge metrics
No merged PRs in 30d

Description

If I want to maintain the current Ink story state when moving across multiple Unity scenes, should I do a kind of autosave before leaving one scene (eg "string currentInkState = _inkStory.state.ToJson();") and then, after entering the new Unity scene, create a new inkStory ("inkStory = new Story(inkAsset.text);"), and then load the autosave into it ("_inkStory.state.LoadJson(currentInkState);") ? And do this with each Unity scene change?

Or would making the Unity scene object that manages the Ink state a singleton make that unnecessary?

What's the best practice? Thanks!

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.