Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
When gameplay experience requires some stateful persistence - e.g. when returning to the game, or even between Scenes the Session can be used to store the game state.
As all games are different, and all state persitence requirements different the default implementation of Session is somewhat abstract, and therefore arguably of limited use.
Things you should know about Session
- ASession comes ready to run (it's created automatically in the default Factory).
- Session automatically saves game state to a SharedObject / LocalStorage.
- Session is the unspoken evil of application design - somewhere arbitration must exist, somewhere concrete values must be retained. Therefore assume each project should extend ASession for its own requirements:
- Implements ISession.
Did you know?
- ASession can store multiple user sessions, stored by id.