keep userid info during scene switch

Hey,

I am working on a game for a school project. Al code is working well. I could log in and untiy will remmebr my userid. and when i get an achievement it will put it to the database rtough PHP and msql.
The problem started when I made a startscene. Now the player has to login in that screen (scene) after that a new scene will load. But the problem is unity didn’t remember the userid so if i get an achievement it doens’t recognize the userid and put’s a 0 for id. Does somebody has a solution for this. Maybe i can store it but i don’t know how.
Hope someone can help me.

So what i am looking for is that i can take the userid information with me to the other scene so that the database know wich user got the achievement.

thanks in advance

G

Well you could try to use PlayerPrefs or you could use a script on a gameobject with dontdestroyonload thingy on it or an singleton which contains that…

Choice is entirely up to you.