PJ/Assets/scripts/ScinsSelect.cs

29 lines
501 B
C#
Raw Normal View History

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class ScinsSelect : MonoBehaviour
{
int SelectedSkin;
public Text NameSkin;
private void Start()
{
NameSkin = GetComponent<Text>();
}
private void SaveS()
{
PlayerPrefs.SetInt("SelectedSkin", SelectedSkin);
}
public void SelectedSkinC(int i)
{
SelectedSkin = i;
SaveS();
}
}