I’m working on a feature where players can take photos of objects in the game world, and these photos are then added to a journal or photo gallery. Each object has a specific tag, which is detected using a raycast when the player takes a photo. The goal is to automatically place the captured photo into a corresponding slot in the journal or gallery, based on the object’s tag.
For example, if the player takes a photo of an object tagged as “cube,” I want that photo to be placed into a dedicated slot for cube photos in the journal. Similarly, if they capture an object tagged as “target,” the photo should go into the slot reserved for a photo of the target. These are “collectables” so can only be taken once, the closet game I can think of is Pokémon Snap for a similar game mechanic.
I am after suggestions on the best way to implement this kind of feature as I have been running into some issues trying to use a dictionary system. Ideally I don’t want to be writing out an if statement for every object you can photograph as there will be many.