🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Block Breaker

Started by
2 comments, last by a light breeze 4 years, 2 months ago

Hi everyone !!!

I have a question regarding the score part in udemy course “ Complete C# Unity Developer 2D: Learn to Code Making Games ” - BLOCK BREAKER

How can you keep the previous score of the previous level while pressing on PLAY AGAIN ???

I used this method in the SceneLoader.cs :

public void LoadPreviousScene()
    {
        int currentSceneIndex = SceneManager.GetActiveScene().buildIndex;
        SceneManager.LoadScene(currentSceneIndex - 1);
    }
Advertisement

No idea what your code does, but it doesn't seem to do anything with scores, does it?

I guess you will need to find the score at this point, and store or use it.

Most udemy courses have a Q&A section. Have you tried asking there?

This topic is closed to new replies.

Advertisement