How to start a conversation with CrossPlatformInput?

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
ghegi
Posts: 1
Joined: Sat May 04, 2019 9:53 am

How to start a conversation with CrossPlatformInput?

Post by ghegi »

Hello, I just bought this asset and then I'm reallyyy having a very hard time to set it up. I just want to learn how to. So I have this character and then an item. Whenever he picks the item, a dialogue will come up that says what the character is thinking about the item. Also I want it to trigger the conversation whenever the item is picked up and that is set through a touch button set up by a Cross Platform Input Manager to make it available for Android.

Please, I really want this. Thank you!
User avatar
Tony Li
Posts: 22056
Joined: Thu Jul 18, 2013 1:27 pm

Re: How to start a conversation with CrossPlatformInput?

Post by Tony Li »

Hi,

(I also replied on the Unity forum.)

I'm not quite sure what you mean. But if you mean you want to use CrossPlatformInput.GetButtonDown instead of Input.GetButtonDown, the Dialogue System supports this. Just add a script like this one to the Dialogue Manager:

DialogueSystemCrossPlatformInput.cs

Code: Select all

using UnityEngine;
using UnityStandardAssets.CrossPlatformInput;

public class DialogueSystemCrossPlatformInput : MonoBehaviour
{
    void Start()
    {
        PixelCrushers.InputDeviceManager.instance.GetButtonDown = GetCrossPlatformButtonDown;
    }

    private bool GetCrossPlatformButtonDown(string buttonName)
    {
        return CrossPlatformInputManager.GetButtonDown(buttonName);
    }
}
Post Reply