I want to change the unity save key like a variable.

Asked 2 years ago, Updated 2 years ago, 46 views

I am currently making a calendar.
I want to save events by date.

I want to change the save key to the date so that I can change it every time.
You cannot change the key in playerPref.Setint.
Is there a good way to save it?

unity3d

2022-09-30 13:46

1 Answers

I'm sorry, but it's easier to answer if you put the source code and want to do this here.

For the time being, PlayerPrefs can store many things, either int or string.
https://docs.unity3d.com/ja/current/ScriptReference/PlayerPrefs.html

PlayerPrefs.SetString("Name", m_PlayerName);

Like this.


2022-09-30 13:46

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.