Show pop up ui above NPC

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Volandpro
Posts: 9
Joined: Sat Feb 04, 2023 3:28 am

Show pop up ui above NPC

Post by Volandpro »

Hello!

Is it possbile to show pop up UI (for example "Press E") above NPC when player enters his trigger and hide it when player leaves it's trigger?
User avatar
Tony Li
Posts: 21954
Joined: Thu Jul 18, 2013 1:27 pm

Re: Show pop up ui above NPC

Post by Tony Li »

Hi,

Yes. Use a Selector Proximity Selector. See the Interaction Tutorial video.
Volandpro
Posts: 9
Joined: Sat Feb 04, 2023 3:28 am

Re: Show pop up ui above NPC

Post by Volandpro »

Oh, it is so simple :) BTW, if I want to change the opacity of my pop up on show/hide, should I use my own scripts or there is an out of the box solution?
User avatar
Tony Li
Posts: 21954
Joined: Thu Jul 18, 2013 1:27 pm

Re: Show pop up ui above NPC

Post by Tony Li »

Duplicate the prefab (e.g., Basic Standard UI Selector Elements) and assign the duplicate to the Dialogue Manager GameObject's Instantiate Prefabs component in place of the original. Then edit it, changing images, fonts, etc., whatever you like.
Volandpro
Posts: 9
Joined: Sat Feb 04, 2023 3:28 am

Re: Show pop up ui above NPC

Post by Volandpro »

Thank you!
User avatar
Tony Li
Posts: 21954
Joined: Thu Jul 18, 2013 1:27 pm

Re: Show pop up ui above NPC

Post by Tony Li »

Glad to help!
Post Reply