Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice
  2. Enter the 2020.2 Beta Sweepstakes for a chance to win an Oculus Quest 2.
    Dismiss Notice

Confirmation popup

Discussion in 'Game Foundation' started by Reelsy, Oct 16, 2020 at 5:05 PM.

  1. Reelsy

    Reelsy

    Joined:
    Jan 12, 2020
    Posts:
    3
    Hi everyone,

    I wanted to know if there is a way to add a confirmation popup to prevent misclick on virtual transactions?

    Thank you in advance.

    Regards
     
  2. erika_d

    erika_d

    Unity Technologies

    Joined:
    Jan 20, 2016
    Posts:
    365
    Hi @Reelsy,

    That's probably not possible with the current Transactions prefab and component, you could however use our TransactionView component as a jumping off point, copy and paste it into your own class and edit it so that it changes the onclick behavior to showing your own dialog game object, instead of immediately initiating the transaction. (You would also need to duplicate our PurchaseButton component and, if you're using our Store prefab, the StoreView component, but you shouldn't need to make any significant changes in those files, they just wouldn't be able to connect to your custom TransactionView component as is.) You can see this thread for an example of a user who customized our StoreView component: https://forum.unity.com/threads/putting-out-an-item-after-buying-from-store.932874/

    It's a good idea though, and I've made note of it on our jira board to look into expanding functionality in this way during future prefab improvement passes.
     
unityunity