2022-05-31 16:13:48 +02:00
|
|
|
using System.Collections;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using UnityEngine;
|
|
|
|
using UnityEngine.UI;
|
|
|
|
|
|
|
|
public class PlayerName : MonoBehaviour
|
|
|
|
{
|
|
|
|
public string nameOfPlayer;
|
|
|
|
public string saveName;
|
|
|
|
|
|
|
|
public Text inputText;
|
2022-10-02 18:45:58 +02:00
|
|
|
public string loadedName;
|
2022-05-31 16:13:48 +02:00
|
|
|
|
|
|
|
|
|
|
|
void Start()
|
|
|
|
{
|
2022-06-03 10:34:31 +02:00
|
|
|
nameOfPlayer = PlayerPrefs.GetString("name", "none");
|
2022-10-02 18:45:58 +02:00
|
|
|
loadedName = nameOfPlayer;
|
2022-05-31 16:13:48 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
public void SetName()
|
|
|
|
{
|
|
|
|
saveName = inputText.text;
|
|
|
|
PlayerPrefs.SetString("name", saveName);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|