Search Unity

Checking if two arrays are at the same slot

Discussion in 'Scripting' started by matias-e, May 17, 2015.

  1. matias-e

    matias-e

    Joined:
    Sep 29, 2014
    Posts:
    106
    Hey. I'm having a little bit of problem trying to compare if two array variables are at the same index slot. How would I go about checking this?
     
  2. Tiatang

    Tiatang

    Joined:
    Jun 1, 2014
    Posts:
    31
    Code (csharp):
    1. if x.IndexOf(y) == z.IndexOf(a) ?
    Not quite sure what you are asking, could you elaborate.
     
  3. matias-e

    matias-e

    Joined:
    Sep 29, 2014
    Posts:
    106
    Hmm.. I think that'll work. Didn't know of that function!