Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

unity create random string

    string RandomStringGenerator(int lenght)
    {
        string characters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890";
        string generated_string = "";

        for(int i = 0; i < lenght; i++)
            generated_string += characters[Random.Range(0, lenght)];

        return generated_string;
    }
Comment

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;
    }
Comment

PREVIOUS NEXT
Code Example
Csharp :: hello world in c# 
Csharp :: hello world program in c# 
Csharp :: c# get executable path 
Csharp :: unity quit in edtor 
Csharp :: change border color of textfield in flutter 
Csharp :: Point to mouse 2D Unity 
Csharp :: unity key detection 
Csharp :: draw sphere gizmo unity 
Csharp :: .net core temp directory 
Csharp :: c# save bytes array to file 
Csharp :: unity get layer of gameobject 
Csharp :: c# input integer 
Csharp :: how to get the current gameobject animator in unity 
Csharp :: kotlin random number 
Csharp :: c# format string to date yyyymmdd 
Csharp :: unity application quit 
Csharp :: stop audio unity 
Csharp :: dotnet executable directory 
Csharp :: format phone number in c# .net 
Csharp :: how to delay execution in c# 
Csharp :: unity set position 
Csharp :: how to get rigidbody speed in unity 
Csharp :: Schema::defultString larvel 
Csharp :: generate random number c# 
Csharp :: c# get last two characters of string 
Csharp :: get filename from path c# 
Csharp :: phone number regex in c# 
Csharp :: c# int to byte array 
Csharp :: read configuration workerservice 
Csharp :: check if belnd tree plaiying 
ADD CONTENT
Topic
Content
Source link
Name
7+2 =