Memory game in 3d space


I’m new here, and I am trying to make a game for my Uni’s project.

So, I’d like to make a memory game (the one that the player has to compare two cards and choose those that match), but in 3D space, because I want to develop it for VR goggles, as well.

Following some tutorials, I managed to make it in 2D canvas, with an array, etc.

But I don’t want to use any button’s click. So I’ve decided to create those cards as objects (imported them as fbx) and set a trigger where, if the player gets close to one card, this will turn around. So the player has to move around the scene, to explore all the cards and match them in couples.

I am looking for a script, that compares two sequential objects, and decides if they match, or not. And finally, to check if the game is finished.

Thanks in advance, any comment would be helpful! Dora

You can create a scriptable object which holds the cards data and when you want to compare just compare them with the data in scriptable object.