Pop up window triggered by sprite button on map.

Hello.

I am looking to have a sprite on a map that acts as a button. On click one of two things are suppose to happen.

  1. a window pops up that plays a video, the video has a play/pause button, a way to back up or skip forward, and an X button to close or can be closed if the user clicks off the pop up window.

  2. a window pops up that displays information such as population, economy size, or other information. Again with an X button to close the window or the user can click off the pop up window to close it.

I have not been able to find any tutorials or anything for this specific use case. Everything seems to be for a main menu or other type of menu and not something in app.

I wouldn’t really call this a use case, you’re trying to create multiple different features here.

If all you’re looking for is a way to do something when you click on a sprite, look into OnMouseDown: Unity - Scripting API: MonoBehaviour.OnMouseDown()

More info on that: Detecting Mouse Click on 2D Sprite - Questions & Answers - Unity Discussions

Edit: You can also just use a regular UI button and give it a custom image.

Here’s a tutorial on how to play video:

Pop up windows with text and an X button are just basic UI stuff. You can find tutorials on youtube for pretty much anything UI related.