Connection between menu and scene

I’m for a couple of months trying to figure out how i can take information from menu scene and gameplay scene and vice versa, for example:

I can customize my hero in the menu scene, give him a weapon or a hat for exemple.

But i want to have this information on gameplay scene

i could make a gameobject that dont destroy on load but im making it multiplayer, so i cant

i tried database too but it takes a lot of time to take information from database and to much code, so its certainly the worst way to do that, and it would be so anoying

Someone can help?

Storing information just so it persists between scenes does not require a database. Storing information online and sharing it with others does require at least a simple form of a database.

What you’re asking is two things.

  1. Storing information on the client side. You can store information in PlayerPrefs, so it will persist even when the app stops and restarts.
  2. Creating a multiplayer game. This is a lot more difficult. Make sure that you are ready for a task like this. If so, consider what exactly you need from your online system, check out database systems (NoSQL vs MySQL), serialising data as JSON objects etc.

Also, for multiplayer games (depending on what platform you’d like to build) check out GameCenter, Google Play and (if not iOS / Android) Photon Multiplayer solutions.

Just want to add, you can simply use static variables.

public class SaveData{
public static String hat;

You can now say:
SaveData.hat = “TopHat”;



anywhere. The variable will persist between scenes and objects as long as the game is running.