Search Unity

Accessing arrays in other scripts.

Discussion in 'Scripting' started by CoffeeConundrum, Sep 17, 2014.

  1. CoffeeConundrum

    CoffeeConundrum

    Joined:
    Dec 30, 2013
    Posts:
    46
    Hey guys,

    Just curious on how the best method would be for allowing me to access an array from a script which is attached to a game object. Been playing around with a few ideas and I'm getting more and more confused the further I get into it.

    Basically, I'm wanting the ability to check the values that are being hold in one array to check it off with an array in the script I'm currently in.

    Hoping this makes sense and any help would be appreciated! :D
    P.S I'm using C#
     
  2. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401