Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

CSharp

string STRING = "Test 1
Test 2
Test 3
Test 4
Test 5";
int webLines = STRING.Split('
').Length;
int lineNumber = UnityEngine.Random.Range(0, webLines - 1);
string lineText = STRING.Split('
').ElementAtOrDefault(lineNumber);
 
PREVIOUS NEXT
Tagged: #CSharp
ADD COMMENT
Topic
Name
6+8 =