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 :: how to pass string value to enum in c# 
Csharp :: get attribute value of xml element c# 
Csharp :: parse datetime c# 
Csharp :: how to check datagridview cell is null or empty 
Csharp :: unity play sound effect 
Csharp :: c# list length 
Csharp :: hello world in unity c# 
Csharp :: camera follow script car unity 
Csharp :: c# clamp 
Csharp :: how to add a gameobject 
Csharp :: C# function return datareader 
Csharp :: unity button press 
Csharp :: c# return list in descending order 
Csharp :: validating file upload asp.net core mvc 
Csharp :: Task.FromResult(null) 
Csharp :: c# parse string to xml 
Csharp :: c# convert datetime to unix timestamp 
Csharp :: c# multi assignment 
Csharp :: c# convert list t to datatable 
Csharp :: c# settings file 
Csharp :: unity call function on update once per second 
Csharp :: c# webclient post file 
Csharp :: generate certificate in windows 
Csharp :: c# use api rest 
Csharp :: textblock line break 
Csharp :: how to append something to a string in c# 
Csharp :: null check syntax c# 
Csharp :: access object property C# 
Csharp :: if set active == false unity 
Csharp :: add spaces in string 
ADD CONTENT
Topic
Content
Source link
Name
9+6 =