Pass playerprefs into next scene...

Hi,
I am pretty new here and would kindly like some direction…I have two scenes (lets call them 1 & 2).

I am trying to pass playerprefs from scene 1 into scene 2…

In scene 2 , I have a networking script to manage player actions and such…
Part of the script has a static field…

public static uMMO_NetObject LOCAL_PLAYER = null;

How can I pass the playerprefs from scene 1 into this variable in scene 2?

many thanks in advance!

In Unity, PlayerPrefs are shared between game sessions as explained in the PlayerPrefs documentation. So you might be able to access them in scene 1 or 2 or whatever scene you are in.

You just need to use the Get and Set functions according to the type of your value and with the correct key.

You can access Playerprefs in any scene with just PlayerPrefs.GetInt("PlayerScore") .Playerprefs are stored externally so u can use them in any scene without doing anything.

If you want access your Manager Class variables in next scene you can use DontDestroyOnLoad (transform.gameObject) . Just write this down in the Awake or Start method of your manager class and you are good to go.

I hope this helps you .