- Home /
Help on a 2d game.
I have not been using unity for long. but I have been making a game and I want help. I do not know how 2 people would work on it at one time. The main thing is my character will some times glitch up on me and I do not know how to fix it and because of that it makes it hard to test my game.
The game is about:
A game to where you have to go though 6 worlds of obstacles a game that take place in a 2d world simple changes to a 3d game packed with fun. even with a world select. I do not know how to make it to where when you beat a world it will save so you can go back to it. so if you want you could just skip to world 6 or something.
thanks!
am can you put some code in?
I saw few your posts and let me direct you for unity Q/A how to post a Question << --- Click Here
and how to post an Answer
I'm doing this since it's clearly you are trying and not ignoring us
and for starters you could learn at: today is a [Introduction to Unity (U3D-101)[130213]][2] again only 30 $$anonymous$$ left
and do not forget you can register 5 $$anonymous$$ before it's started the time is UTC || G$$anonymous$$T 0
you can also learn from:
I learned alot of all 3 of them in beginning
[2]: http://unity3d.com/company/support/online-training/
Answer by dubbreak · Feb 14, 2013 at 01:07 AM
Quickest and easiest way (which will work on any platform) is to save what levels they have passed to PlayerPrefs.
If they need to pass levels consecutively (i.e. pass level 1 before level 2) then you could do something as simple as:
//on passing level 5
PlayerPrefs.SetInt("MaxLevelPassed", 5);
//========snip - elsewhere in code ========
//on the select level screen
int maxLevelPassed = PlayerPrefs.GetInt("MaxLevelPassed")
foreach(var levelIcon in levelIcons)//itterate through your level icons or however you select which level
{
levelIcon.Enabled = (levelIcon.Level <= (maxLevelPassed + 1)) //allow user to play all previously played levels and the next one
}
Something like this is quick and easy and will get you going. Downside is playerprefs is accessible by the user (if they know unity really well). Otherwise you can save your data to a file (e.g. xml) or database or whatever. Basically you are looking for a way to persist data and playerPrefs is the easiest way. Here's a video tutorial on using player prefs.
There are plenty of people that have asked this question and lots of answers. Here's a good one:
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Switching Between "Dimensions"? 1 Answer
3d or 2d? please help unity creators 0 Answers