Topic: Story mode not works with playerprefs

Hi YumChaGames,
I am working with UFE 1.6.
I have created my stories with your guid lines.
But all winning fights are not set in playerprefs, means when i win 3 fights and i reopen the game.
Then it's start with again 1st opponents. My winning record not saved.
If you have already saved those all winning fights records , then where i am wrong i cant get it.
Can you guid me how can i saved that all my winning fights in playerprefs, and when i come back in my game again then continue from that opponent.

I have also tried this :

In UFE.cs : line no-830
"UFE.storyMode.defeatedOpponents.Clear ();"
I was comment this line, but it never worked.

So that i want to know that , Is this line workes for my problem? or what is the working of this line ?


Thank you so much.

Share

Thumbs up Thumbs down

Re: Story mode not works with playerprefs

UFE doesn't save Story Mode wins to PlayerPrefs.  You would need to set this up yourself.  Shouldn't be too hard - when the UFE.WonStoryModeBattle() function is called, just save the current matches to your PlayerPrefs.

I would then also create a Continue option for Story Mode, which you should override the regular StartStoryMode with when there is a current Saved Game (or give the option to start Story Mode again).  Don't forget to ensure the UI is updated to suit.

I also recommend using PlayerPrefsX, since that allows you to save arrays.

Share

Thumbs up +1 Thumbs down

Re: Story mode not works with playerprefs

Hi YumChaGames,
I have tried,but i cant get success.
Can you guid me , in which method i have to handle this and do code for store each story mode's battle?

Share

Thumbs up Thumbs down

Re: Story mode not works with playerprefs

hi YumchaGames

i dont know any thing about playerprefs can u explain me what is that or were can i get it

Share

Thumbs up Thumbs down

Re: Story mode not works with playerprefs

vanyvyas wrote:

hi YumchaGames

i dont know any thing about playerprefs can u explain me what is that or were can i get it

PlayerPrefs are stored by Unity in the editor and in a standalone copy of your game (and any game made with Unity.).

Think of it as your save data

Share

Thumbs up Thumbs down