[Unity 4.6 Beta] Array of sprites

Hi !

I want to create an interface where i can choose which images to display with a button.

In my game i have 4 images to display and 8 images in stock. When i click on the first image the 7 others appear. When i click on one of them, it takes its place.

I try this :

using UnityEngine;
using System.Collections;

public class VariableController : MonoBehaviour
{

   public static    int       displayPos;
   public static   Sprite[]    displaySpell;
   public          Sprite[]    image;

   void Start ()
   {
      displaySpell = image;
   }

   public void setDisplayPos(int pos)
   {
      displayPos = pos;
   }

   public void modifySpell(int pos)
   {
      displaySpell[displayPos] = image[pos];
   }
}

So, i have two Array of Sprite. One of them corresponds of the image display. The other corresponds images in sotcks.
Where i do " displaySpell[displayPos] = image[pos]; " my array image is modify. But i don’t know why … I just want to modify my displayPlay array.

How can i do what i want ?

Tanks

displaySpell = image;

you assign one array to the other in start so they same?

can use UnityEngine.UI.Image in 4.6