Creating the Gallery prefab
When it runs, our project will house multiple images in individual galleries. Each gallery will be a self-contained prefab containing thumbnail previews, scripts for user interaction, and a category title. The next several steps will involve building the first gallery. Once completed, these objects will become prefabs for creating additional image galleries with their own unique content:
- Make an empty GameObject and title it
GalleryHolder
. This object is the primary receptacle for the individual galleries. All images and canvases will exist inside of this container. - Move
GalleryHolder
to (0
,0
,0
).
- Add a
Canvas
to theGalleryHolder
GameObject and name itGallery
. Do this by right-clicking onGalleryHolder
in theHierarchy
window and choosingUI
|Canvas
. - Rename the Canvas GameObject
Gallery
in theInspecto
r
.
This canvas will be the parent of the individual UI elements for a single gallery. Everything we need to build and display to the user will be included here. This...