Highlighting the selected picture
There are many ways to highlight objects in Unity to indicate that an object has been selected by the user. Often, you'll find that a custom shader will do the trick (there are many on the Asset Store). The decision comes down to what "look" you want. Do you want to change the selected object's color tint, draw a wireframe outline, or create some other effect? Instead of doing this and to keep things easy, I'll just introduce a "highlight" game object in the FramedPhoto prefab as a thin yellow box that extends from the edges of the frame. Let's make that now:
- Open the FramedPhoto prefab for editing by double-clicking it in the Project window.
- In the Hierarchy window, right-click on the AspectScaler object and select 3D Object | Cube. Rename the cube
Highlight
. - Set its Transform | Scale setting to (
1.05, 1.05, 0.005
) so that it is thin and extends past the edges of the frame. - Set its Transform...