Merge branch 'modify-ui' into dev
# Conflicts: # Assets/Scripts/UI/Prefab/Panel/HomeController.cs # Assets/Scripts/Utils/Utils.cs
This commit is contained in:
commit
038720e7bd
84 files changed
+9215
-7132
No files matched your search
@@ -96,5 +96,19 @@ namespace Assets.Scripts
|
||||
ColorUtility.TryParseHtmlString(hex, out Color c);
|
||||
return c;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Generate random digit code
|
||||
/// </summary>
|
||||
/// <param name="length">Length</param>
|
||||
/// <returns>Result string</returns>
|
||||
public static string GenerateRandomDigitCode(int length)
|
||||
{
|
||||
var random = new System.Random();
|
||||
string str = string.Empty;
|
||||
for (int i = 0; i < length; i++)
|
||||
str = String.Concat(str, random.Next(10).ToString());
|
||||
return str;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user