Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Checking if two arrays are at the same slot

Discussion in 'Scripting' started by Kinkku2, May 17, 2015.

  1. Kinkku2

    Kinkku2

    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. Kinkku2

    Kinkku2

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