We can cancel a conversation with the button return of our cellphones

Announcements, support questions, and discussion for the Dialogue System.
User avatar
rauljl1
Posts: 55
Joined: Fri Apr 15, 2022 7:40 pm

We can cancel a conversation with the button return of our cellphones

Post by rauljl1 »

Hi, Tony. As I said on the title, I noticed that I can skip/ avoid or cancel a conversation just by press the button return of my cellphone. I'm currently working on a math game. So I need that the conversations can't skip/avoid or cancel with that button. Is there any way?
User avatar
Tony Li
Posts: 21977
Joined: Thu Jul 18, 2013 1:27 pm

Re: We can cancel a conversation with the button return of our cellphones

Post by Tony Li »

Hi,

Inspect the Dialogue Manager GameObject. Set Display Settings > Input Settings > Cancel Subtitle Input and Cancel Conversation Input > Key to None and Button to an empty string.

If that doesn't fix it, it might be related to continue buttons. Set Subtitle Settings > Continue Button to Never.

If that doesn't fix it, check if you have any custom scripts that call DialogueManager.StopConversation().
User avatar
rauljl1
Posts: 55
Joined: Fri Apr 15, 2022 7:40 pm

Re: We can cancel a conversation with the button return of our cellphones

Post by rauljl1 »

None have worked for me :/. Any other idea?
User avatar
Tony Li
Posts: 21977
Joined: Thu Jul 18, 2013 1:27 pm

Re: We can cancel a conversation with the button return of our cellphones

Post by Tony Li »

Hi,

Are you playing a build on your device? If so, do you mean the button on your device that closes the current app?

If so, when you close a Unity app, it ends the application. When you resume the app, it starts the application from the beginning. If you want to resume at the same point when the user closed the app, you will need to set up the save system and add and configure ConversationStateSaver and AutoSaveLoad components.
User avatar
rauljl1
Posts: 55
Joined: Fri Apr 15, 2022 7:40 pm

Re: We can cancel a conversation with the button return of our cellphones

Post by rauljl1 »

Yes. I played the game on my device. An android device. My cellphone have a button to "return" windows. All the cellphones have the same button. When a conversation is running if I press the button, the conversation is closed.
User avatar
Tony Li
Posts: 21977
Joined: Thu Jul 18, 2013 1:27 pm

Re: We can cancel a conversation with the button return of our cellphones

Post by Tony Li »

Thanks. Please use the instructions I provided above. If you have questions, let me know.
User avatar
rauljl1
Posts: 55
Joined: Fri Apr 15, 2022 7:40 pm

Re: We can cancel a conversation with the button return of our cellphones

Post by rauljl1 »

The return button don't close the aplication but only close the conversation. There is another button which minimize the aplication.
I only want to know what to do to avoid closing the conversation.
User avatar
Tony Li
Posts: 21977
Joined: Thu Jul 18, 2013 1:27 pm

Re: We can cancel a conversation with the button return of our cellphones

Post by Tony Li »

Hi,
rauljl1 wrote: Sun May 15, 2022 12:21 pmThe return button don't close the aplication but only close the conversation. There is another button which minimize the aplication.
Is this an Android button or a Unity UI button?

If it's an Android button, it still terminates the app, or at least releases some of its runtime memory. When you return to the app, Unity will start it again from the first scene in build settings. So you must use the steps I provided above to restore the conversation state.

If you're talking about a Unity UI button, what UI button? What is its purpose?
User avatar
rauljl1
Posts: 55
Joined: Fri Apr 15, 2022 7:40 pm

Re: We can cancel a conversation with the button return of our cellphones

Post by rauljl1 »

This is the button that I was talking:Image
Attachments
1
1
1.jpeg (74.32 KiB) Viewed 511 times
User avatar
Tony Li
Posts: 21977
Joined: Thu Jul 18, 2013 1:27 pm

Re: We can cancel a conversation with the button return of our cellphones

Post by Tony Li »

That button suspends the Unity app. When you return to the Unity app, Unity starts it from the beginning. So you must use the steps I provided above. The Auto Save Load component will save the conversation state before suspending the app. When you resume the app, the Auto Save Load component will resume the conversation state.
Post Reply