Ok I know I can compare 2 strings or 2 lists pretty easily.
public string test1 = "book,case,that,other";
public string test2 = "book,case,notsame";
void Start() {
if (test1 == test2) {
Debug.Log("The Same");
}
else {
Debug.Log("Different");
}
}
In that example, Test1 and Test2 are different so Unity would return a value of Different.
Ok now here is my question. Lets say my variable changed and changed in length.
One moment it could be:
Test1 = “book,book,book,book,book,shubbery,”
The next moment it could be:
Test1 = “red,red,red,”
In that case, I wouldn’t be able to set up another string to test it against since it changes so much. The ultimate goal would be to take the values within Test1:
“book,book,book,book,book,shubbery”
And test them to see if they are all identical. So:
“book,book,book,book,” would be returned as all identical while
“book,book,pail,pail” would be returned as not identical.