小编Ghe*_*kon的帖子

IBM Watson Unity 3D SDK保护服务(几乎正常工作!)

在服务示例中找到了一个有效的对话脚本.再次感谢@Taj!

我觉得我非常接近它的工作.我在使用TJBot的Raspberry Pi上做了同样的事情,所以我拥有所有帐户,并且我正确地链接了所有凭据,包括来自Conversation工具的工作区ID.我正在使用Unity 3D 5.5.1f1和最新的SDK,这是13天前更新的.

我将SDK的github页面上的对话示例代码复制并粘贴到一个全新的C#文件中:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using IBM.Watson.DeveloperCloud.Services.Conversation.v1;

public class test : MonoBehaviour {
    private Conversation m_Conversation = new Conversation();
    private string m_WorkspaceID = "my ID on the conversation tooling site";
    private string m_Input = "Hi Alex";
    // Use this for initialization
    void Start () {
        Debug.Log("User: " + m_Input);
        m_Conversation.Message(OnMessage, m_WorkspaceID, m_Input);
    }

    // Update is called once per frame
    void Update () {

    }

    void OnMessage(MessageResponse resp, string customData)
    {
        //Parsing resp …
Run Code Online (Sandbox Code Playgroud)

c# chatbot unity-game-engine watson-conversation watson

4
推荐指数
1
解决办法
479
查看次数