Answers for "how to generate a random string unity"

C#
0

unity random string

string RandomStringGenerator(int lenght)
    {
        //string st = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
        string result = "";
        for (int i = 0; i < lenght; i++)
        {
            char c = (char)('A' + Random.Range(0, 26));
            result += c;
        }

        return result;
    }
Posted by: Guest on March-31-2021

Code answers related to "how to generate a random string unity"

C# Answers by Framework

Browse Popular Code Answers by Language