Answers for "unity static class"

C#
-1

unity static class

//The static class
using UnityEngine;

public static class SaveManager
{
    public static string GetString(string key)
    {
        return PlayerPrefs.GetString(key);
    }
}

//Where it´s used
Playername = SaveManager.GetString("PlayernameKey");
Posted by: Guest on February-13-2021

C# Answers by Framework

Browse Popular Code Answers by Language