Hi guys!
For a uni project my group and I want to make a game (language learning game where you learn Danish and get historical information about Denmark). We made a village using the POLYGON - Vikings Pack from Synty Studios. It is based on a lot of click-events and since none of us have programmed with C# before we’re kinda confused. We want to make a building object click-able and when it’s clicked an image/window will appear. You’re also supposed to be able to click on that image/window to go further (The building is the “school” - when you click on it you open an image/window saying “Take lesson” and “Take test”, when you click on either of them you’ll get directed to another image/window where you can pick a lesson or test and then either take the lesson or test). We made pictures for our low-fi prototype so we do have the pictures needed for the lessons/tests. I’ve tried to look around to find a solution but I can’t seem to find anything that will fit our needs. What is the easiest to do? Is there another way to make this happen other than a lot of clickable images?
You simply have to make a script like this:
https://docs.unity3d.com/ScriptReference/EventSystems.IPointerClickHandler.html
Then attach it to any Gameobject Raycast-able like BoxCollider, Sprite or Image in UI.