I'm trying to implement Watson Assistant into Unity.
When I create a new Credentials object using the username, password, and serviceUrl as arguments. The serviceUrl is set correctly, but the username and password remain null. I use the same exact code for other services but specifically with this script I get this bug.
//Properties
[SerializeField]
private string _username;
[SerializeField]
private string _password;
[SerializeField]
private string _serviceUrl;
private void CreateService() {
//Credentials
Debug.Log(_username);
Debug.Log(_password);
Debug.Log(_serviceUrl);
Credentials credentials = new Credentials(_username, _password, _serviceUrl);
Debug.Log(credentials.Username);
Debug.Log(credentials.Password);
Debug.Log(credentials.Url);
//Service
//service = new Assistant(credentials);
}
OUTPUT
username
password
serviceUrl
null
null
serviceUrl
I was getting the same issue with the example script.