- Home /
Player object carried from scene to scene
I am currently working a shooter type game, and the character the player plays as, is a game object. (Obviously) But in every shooter i have made before, I haven't been able to save that same game object with all the guns they have gained to the next scene.
The result has been that i have to put every weapon they have found up to that point on the ground because I can't fathom what to do.
I have looked up questions like this, but haven't found a satisfactory answer, so I am asking myself. I do have a level transition script, which is as follows,
var nextLevel : String;
function OnTriggerEnter() {
Application.LoadLevel (nextLevel);
}
But I this does is change the level. What i'm hoping to learn specifically, is how to save the players gameobject as a prefab, and using that prefab in the next level.
Any help is greatly appreciated.
I'm not sure how to implement that, or what it would do :/
If you put that as an answer getyour411, i'll mark it as correct, i just tried fiddling with a script that uses Dontdestroyonload, and it worked
Your answer
Follow this Question
Related Questions
How to save all scene? 1 Answer
carrying player data from one scene to the next 1 Answer
how to transport a selection from scene to scene 1 Answer
When Near Object, Change Scene 0 Answers