You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+46-2Lines changed: 46 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,7 +35,7 @@ Ensure that you have the following prerequisites:
35
35
* If using Unity 2018.2 or later you'll need to set **Scripting Runtime Version** and **Api Compatibility Level** in Build Settings to **.NET 4.x equivalent**. We need to access security options to enable TLS 1.2.
36
36
37
37
## Getting the Watson SDK and adding it to Unity
38
-
You can get the latest SDK release by clicking [here][latest_release_sdk]. You will also need to download the latest release of the IBM Unity SDK Core by clicking [here][latest_release_core]
38
+
You can get the latest SDK release by clicking [here][latest_release_sdk]. **You will also need to download the latest release of the IBM Unity SDK Core by clicking [here][latest_release_core].**
39
39
40
40
### Installing the SDK source into your Unity project
41
41
Move the **`unity-sdk`** and **`unity-sdk-core`** directories into the **`Assets`** directory of your Unity project. _Optional: rename the SDK directory from `unity-sdk` to `Watson` and the Core directory from `unity-sdk-core` to `IBMSdkCore`_.
There are two ways to supply the credentials you found above to the SDK for authentication.
191
+
192
+
#### Credential file (easier!)
193
+
194
+
With a credential file, you just need to put the file in the right place and the SDK will do the work of parsing it and authenticating. You can get this file by clicking the **Download** button for the credentials in the **Manage** tab of your service instance.
195
+
196
+
The file downloaded will be called `ibm-credentials.env`. This is the name the SDK will search for and **must** be preserved unless you want to configure the file path (more on that later). The SDK will look for your `ibm-credentials.env` file in the following places (in order):
197
+
198
+
- Your system's home directory
199
+
- The top-level directory of the project you're using the SDK in
200
+
201
+
As long as you set that up correctly, you don't have to worry about setting any authentication options in your code. So, for example, if you created and downloaded the credential file for your Discovery instance, you just need to do the following:
If you're using more than one service at a time in your code and get two different `ibm-credentials.env` files, just put the contents together in one `ibm-credentials.env` file and the SDK will handle assigning credentials to their appropriate services.
219
+
220
+
If you would like to configure the location/name of your credential file, you can set an environment variable called `IBM_CREDENTIALS_FILE`. **This will take precedence over the locations specified above.** Here's how you can do that:
221
+
222
+
```bash
223
+
export IBM_CREDENTIALS_FILE="<path>"
224
+
```
225
+
226
+
where `<path>` is something like `/home/user/Downloads/<file_name>.env`.
227
+
228
+
#### Manually
229
+
230
+
If you'd prefer to set authentication values manually in your code, the SDK supports that as well. The way you'll do this depends on what type of credentials your service instance gives you.
231
+
188
232
## Callbacks
189
233
A success callback is required. You can specify the return type in the callback.
190
234
```cs
@@ -434,7 +478,7 @@ See [CONTRIBUTING.md](.github/CONTRIBUTING.md).
0 commit comments