Implementing an Image Gallery

Is it possible to create an Image gallery similar to this : using Unity3d. I know it is possible to click, drag images and save them using jQuery. But is there a way to create images dynamically in Unity3d and then load, move, drag and save them?

If that sounded confusing, this is what I want to do.

  1. Create a blank board.
  2. Add 'n' number of images to the board to display them on the screen.
  3. As a new image is added the other images automatically move and adjust to accommodate the new image (auto align feature).
  4. The images may not be of fixed size.
  5. Finally once all this is done, save the page so that next time they are all loaded the same way.
  6. All this needs to be done using the Web Player.(should have mentioned this first).

What I have thought so far-

  1. Create a plane for the board. (this will hold the images).
  2. Create/load prefabs of planes and then add the images as texture to them. So this will create 'n' different planes for n images.
  3. Save the rect() property of the planes once the user is done arranging them.

Is this possible using Unity3d or is there a better solution? I need to create a photo gallery where the user can basically enter the studio and see different photos of each side of the studio.

Any suggestions and help is much appreciated.

Have you taken a look at the example: "Using the UnityGUI ScrollView to create a masked sliding menu" on the examples page?

You can accomplish pretty good results (with a small amount of code), using the eDriven RIA framework. Here’s the image gallery demo:

Unity makes dynamic queries to Flickr and retrieves images. Note that Core part of the framework (asynchronous loading via HTTP, caching…) is completely free and open source: GitHub - dkozar/edriven: Unity3d event-driven framework


You can do this in Unity, but I'd advise against it. This problem has been solved time and time again using the real Javascript (not UnityScript). The solution I'd recommend involves jQuery, which is a library for Javascript. You find what you're looking for (called a carousel, by the way) done over and over again. Here's a link to a prebuilt plugin that does exactly what you're looking for.

I don't know if you're still interested in doing this, but the iTween library has a lot of transition effects that you are looking for that other web languages have made popular. You can give that a shot.