Closed TonderaiZR closed 8 years ago
The SDK should be placed in the Assets directory and renamed from unity-sdk-x.x.x
to Watson
. It looks like you put the entire directory unity-sdk-0.3.0
into a directory named Watson
instead of renaming it.
Ok . What can I do as a fix ? Or is it best to redo it from the start again.
No need to redo the steps.
1) Move the directory labeled unity-sdk-0.3.0
up one level (to the Assets
directory, the same level as your Watson
directory).
2) Delete the now empty Watson
directory.
3) Rename the unity-sdk-0.3.0
directory to Watson
.
You should be fine after this.
Hello MeduimTaj
I have made changes but this is the error thats showing. I think I have to make a code edit.
DirectoryNotFoundException: Could not find a part of the path "C:\Users\pc\Documents\WATSON_UNITY3D\AssetsC:\Users\pc\Documents\WATSON_UNITY3D\Assets\Watson\Scripts\Editor\TestData".
System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/FileStream.cs:292)
System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share)
(wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare)
System.IO.File.OpenRead (System.String path) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/File.cs:363)
System.IO.File.ReadAllBytes (System.String path) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/File.cs:538)
IBM.Watson.DeveloperCloud.Services.Dialog.v1.Dialog.UploadDialog (System.String dialogName, IBM.Watson.DeveloperCloud.Services.Dialog.v1.OnUploadDialog callback, System.String dialogFileName) (at Assets/Watson/Scripts/Services/Dialog/Dialog.cs:255)
IBM.Watson.DeveloperCloud.Widgets.DialogWidget.OnGetDialogs (IBM.Watson.DeveloperCloud.Services.Dialog.v1.Dialogs dialogs) (at Assets/Watson/Scripts/Widgets/DialogWidget.cs:139)
IBM.Watson.DeveloperCloud.Services.Dialog.v1.Dialog.OnGetDialogsResp (IBM.Watson.DeveloperCloud.Connection.Request req, IBM.Watson.DeveloperCloud.Connection.Response resp) (at Assets/Watson/Scripts/Services/Dialog/Dialog.cs:138)
IBM.Watson.DeveloperCloud.Connection.RESTConnector+
That looks like it's setting the path as Application.DataPath + Application.DataPath + "Watson/Scripts/Editor/TestData"
If you open the ExampleDialog
Unity Scene, there is a GameObject called DialogWidget
under the ExampleDialog
GameObject. In the DialogWidget
component what does the Auto Upload Dialog
field read?
Hello
The reading on DialogWidget
Auto Upload is
C:\Users\pc\Documents\WATSON_UNITY3D\Assets\Watson\Scripts\Editor\TestData
On the DialogWidget.cs
is
private string m_AutoUploadDialog = "WATSON_UNITY3D/Assets/Watson/Scripts/Editor/TestData/";
@Tondy The Dialog was deprecated. There is a new service which does more than what dialog used to do and has a nice UI you can use to create the conversation.
See: https://www.ibm.com/watson/developercloud/conversation.html
Ok. Is they a Unity3d updated version with conversation? If we can git clone the new version that will be fine.
Cheers
The Auto Upload Dialog
for the ExampleDialog
scene should be
/Watson/Scripts/Editor/TestData/pizza_sample.xml
In DialogWidget.cs
AutoUploadDialog should be
private string m_AutoUploadDialog = "/Watson/Editor/TestData/pizza_sample.xml";
That is a SerializeField
though so it will be overwritten by whatever is in the DialogWidget
component in the Editor.
The new Conversation
service is abstracted in the WDC Unity SDK but there is no Widget associated with it yet.
https://github.com/watson-developer-cloud/unity-sdk#conversation
Aw some it is now working. Some scripts are deprecated. But got the demos running. Thank you very much.
Hello
Hello I am running using the watson-cloud unity-sdk with Unity 3D 5.4 . I try open Example dialog
but the error below appears . I have tried changing the file location and directly locating the folder then copying the path. No luck. Hope you can help.
DirectoryNotFoundException: Could not find a part of the path "C:\Users\pc\Documents\WATSON_UNITY3D\AssetsWATSON_UNITY3D\Assets\Watson\unity-sdk-0.3.0\Scripts\Editor\TestData\pizza_sample.xml". System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/FileStream.cs:292) System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share) (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare) System.IO.File.OpenRead (System.String path) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/File.cs:363) System.IO.File.ReadAllBytes (System.String path) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/File.cs:538) IBM.Watson.DeveloperCloud.Services.Dialog.v1.Dialog.UploadDialog (System.String dialogName, IBM.Watson.DeveloperCloud.Services.Dialog.v1.OnUploadDialog callback, System.String dialogFileName) (at Assets/Watson/unity-sdk-0.3.0/Scripts/Services/Dialog/Dialog.cs:255) IBM.Watson.DeveloperCloud.Widgets.DialogWidget.OnGetDialogs (IBM.Watson.DeveloperCloud.Services.Dialog.v1.Dialogs dialogs) (at Assets/Watson/unity-sdk-0.3.0/Scripts/Widgets/DialogWidget.cs:139) IBM.Watson.DeveloperCloud.Services.Dialog.v1.Dialog.OnGetDialogsResp (IBM.Watson.DeveloperCloud.Connection.Request req, IBM.Watson.DeveloperCloud.Connection.Response resp) (at Assets/Watson/unity-sdk-0.3.0/Scripts/Services/Dialog/Dialog.cs:138) IBM.Watson.DeveloperCloud.Connection.RESTConnector+c__Iterator7.MoveNext () (at Assets/Watson/unity-sdk-0.3.0/Scripts/Connection/RESTConnector.cs:474)
IBM.Watson.DeveloperCloud.Utilities.Runnable+Routine.MoveNext () (at Assets/Watson/unity-sdk-0.3.0/Scripts/Utilities/Runnable.cs:128)