Repository
Concepts
Repositories primarily manage data to be persisted.
It is acquired and updated across multiple screens.
When to use it?
For example, usernames, communication-related information, etc. are handled by including them in a repository.
In most cases, we get it from the server at login and create the repository at that time.
You can manage it as a singleton, but make sure you manage it with the appropriate LifetimeScope because the Repository can be destroyed/rebuilt, for example, when you want to return to the title screen and destroy the login information.
Example code
PreviousAbout the timing of communication processing according to screen switchingNextScreen-to-screen messaging with MessagePipe
Last updated